SapObject.SapModel.EditSolid.ExtrudeAreaToSolidLinearUser
Function ExtrudeAreaToSolidLinearUser(ByVal Name As String, ByVal PropName As String, ByVal dx As Double, ByVal dy As Double, ByVal dz As Double, ByVal Number As Long, 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.
dx, dy, dz
These are the x, y and z offsets used, in the present coordinate system, to create each new solid object.
Number
The number of increments for the extrusion.
NumberSolids
The number of solid objects created when the specified area object is extruded. Usually this item is returned the same as the Number item. However, in some cases, such as when an area object with more than four sides is extruded, this item will be larger than the Number item.
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 a user specified direction, into solid objects.
The function returns zero if the extrusion is successful; otherwise it returns a nonzero value.
Sub LinearUserAreaExtrusionToSolids()
'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 in user direction
ret = SapModel.EditGeneral.ExtrudeAreaToSolidLinearUser("2",
"Default", 20, 144, 0, 3, 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.
ExtrudeAreaToSolidLinearNormal