Description
Adds a shell having the specified name and returns an RFEntityID value of the new shell.
Syntax
Function RFModel.AddShell(type As RFShellType, Name As String) As RFEntityID
The AddShell syntax has these parts:
| Part | Description |
|---|---|
| type | [IN] RFShellType Required. Type of the shell to add. |
| Name | [IN] String Required. String expression that identifies shell's name to add. |
Remarks
Sample
Dim rfErr As RFErrorCode
Dim mdObj As RapidForm.RFModel
Dim shObj As RapidForm.RFShell
Set mdObj = RapidForm.Model
Set shObj = RapidForm.Shell
Dim shID As RFEntityID
' Add a blank sell.
shID = mdObj.AddShell(RF_GENERIC_SHELL, "Simple shell")
' Register the shell in the GUI database.
rfErr = RapidForm.UserInterface.AddShellToProjectTree(shID)
rfErr = shObj.SetID(shID)
' Add three vertices in the shell.
Dim vtID(2) As RFEntityID
rfErr = shObj.AddVertex(0, 0, 0, vtID(0))
rfErr = shObj.AddVertex(10, 0, 0, vtID(1))
rfErr = shObj.AddVertex(0, 10, 0, vtID(2))
' Add a face composed by the three vertices.
Dim fcID As RFEntityID
rfErr = shObj.AddFace(vtID(0), vtID(1), vtID(2), False, fcID)
' Update the GUI database and redraw the scene.
rfErr = RapidForm.Document.RegenShell(shID)
RapidForm.Document.RedrawScene