SapObject.SapModel.FrameObj.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 straight frame object.
NumberForces
The number of P-Delta forces assigned to the frame object.
PDeltaForce
This is an array of the P-Delta force values assigned to the frame object. [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 frame object local 1-axis direction.
This function retrieves the P-Delta force assignments to frame objects. P-Delta forces do not apply to curved frame objects. If you request data for a curved frame, an error is returned.
The function returns zero if the assignments are successfully retrieved, otherwise it returns a nonzero value.
Sub GetFramePDeltaForce()
'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
ret = SapModel.FrameObj.SetPDeltaForce("ALL",
100, 0, True, , Group)
'get P-Delta force
ret = SapModel.FrameObj.GetPDeltaForce("3",
NumberForces, PDeltaForce, Dir, CSys)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.