SapObject.SapModel.LineElm.GetPDeltaForce
Function GetPDeltaForce(ByVal Name As String, ByRef NumberForces As Long, ByRef PDeltaForce() As Double, ByRef Dir() As Long, ByRef CSys() As String) As Long
Name
The name of an existing line element.
NumberForces
The number of P-Delta forces assigned to the line element.
PDeltaForce
This is an array of the P-Delta force values assigned to the line element. [F]
Dir
This is an array that contains 0, 1, 2 or 3, indicating the direction of each P-Delta force assignment.
0 = Frame object local 1-axis direction
1 = Projected X direction in CSys coordinate system
2 = Projected Y direction in CSys coordinate system
3 = Projected Z direction in CSys coordinate system
CSys
This is an array that contains the name of the coordinate system in which each projected P-Delta force is defined. This item is blank when the Dir item is zero, that is, when the P-Delta force is defined in the line element local 1-axis direction.
This function retrieves the P-Delta force assignments to line elements.
The function returns zero if the assignments are successfully retrieved, otherwise it returns a nonzero value.
Sub GetLineElmPDeltaForce()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberForces As Long
Dim PDeltaForce() As Double
Dim Dir() As Long
Dim CSys() 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,
3, 124, 3, 200)
'assign P-Delta force to frame object
ret = SapModel.FrameObj.SetPDeltaForce("ALL",
100, 0, True, , Group)
'create the analysis model
ret = SapModel.Analyze.CreateAnalysisModel
'get P-Delta force for line element
ret = SapModel.LineElm.GetPDeltaForce("3-1",
NumberForces, PDeltaForce, Dir, CSys)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.