SapObject.SapModel.EditSolid.ExtrudeFrameToAreaLinear
Function ExtrudeFrameToAreaLinear(ByVal Name As String, ByVal PropName As String, ByVal dx As Double, ByVal dy As Double, ByVal dz As Double, ByVal NumberAreas As Long, ByRef AreaName() As String, Optional Remove As Boolean = True) As Long
Name
The name of an existing straight frame object to be extruded.
PropName
This is Default, None or the name of a defined area property to be used for the new extruded area objects.
dx, dy, dz
These are the x, y and z offsets used, in the present coordinate system, to create each new area object.
NumberAreas
The number of area objects created when the specified line object is extruded.
AreaName
This is an array of the name of each area object created when the specified line object is extruded.
Remove
If this item is True, the straight frame object indicated by the Name item is deleted after the extrusion is complete.
This function creates new area objects by linearly extruding a specified straight frame object into area objects.
The function returns zero if the extrusion is successful; otherwise it returns a nonzero value.
Sub LinearFrameExtrusionToAreas()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim AreaName() As String
'create Sap2000 object
Set SapObject = New SAP2000.SapObject
'start Sap2000 application
SapObject.ApplicationStart
'create SapModel object
Set SapModel = SapObject.SapModel
'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame,
2, 144, 2, 288)
'linearly extrude frame to areas
ret = SapModel.EditGeneral.ExtrudeFrameToAreaLinear("8",
"Default", 0, 144, 0, 3, AreaName, True)
'refresh view
ret = SapModel.View.RefreshView(0,
False)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.