SapObject.SapModel.EditSolid.ExtrudeAreaToSolidLinearNormal
Function ExtrudeAreaToSolidLinearNormal(ByVal Name As String, ByVal PropName As String, ByVal nPlus3 As Long, ByVal tPlus3 As Double, ByVal nMinus3 As Long, ByVal tMinus3 As Double, ByRef NumberSolids As Long, ByRef SolidName() As String, Optional Remove As Boolean = True) As Long
Name
The name of an existing straight frame object to be extruded.
PropName
This is either Default or the name of a defined solid property to be used for the new extruded solid objects.
nPlus3
The number of solid objects created in the positive local 3-axis direction of the specified area object.
tPlus3
The thickness of the solid objects created in the positive local 3-axis direction of the specified area object.
nMinus3
The number of solid objects created in the negative local 3-axis direction of the specified area object.
tMinus3
The thickness of the solid objects created in the negative local 3-axis direction of the specified area object.
NumberSolids
The number of solid objects created when the specified area object is extruded.
SolidName
This is an array of the name of each solid object created when the specified area object is extruded.
Remove
If this item is True, the area object indicated by the Name item is deleted after the extrusion is complete.
This function creates new solid objects by linearly extruding a specified area object, in the local 3-axis direction of the area object, into solid objects.
The function returns zero if the extrusion is successful; otherwise it returns a nonzero value.
Sub LinearNormalAreaExtrusionToSolids()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberSolids As Long
Dim SolidName() 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.NewWall(2, 48,
2, 48)
'linearly extrude area to solids normal to area
ret = SapModel.EditGeneral.ExtrudeAreaToSolidLinearNormal("2",
"Default", 1, 48, 1, 48, NumberSolids, SolidName, 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.