SapObject.SapModel.LineElm.GetEndLengthOffset
Function GetEndLengthOffset(ByVal Name As String, ByRef Length1 As Double, ByRef Length2 As Double, ByRef rz As Double) As Long
Name
The name of an existing line element.
Length1
The offset length along the 1-axis of the line element at the I-End of the line element. [L]
Length2
The offset along the 1-axis of the line element at the J-End of the line element. [L]
rz
The rigid zone factor. This is the fraction of the end offset length assumed to be rigid for bending and shear deformations.
This function retrieves the line element end offsets along the 1-axis of the element.
The function returns zero if the offsets are successfully retrieved, otherwise it returns a nonzero value.
Sub GetLineElmEndOffsets()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Length1 As Double
Dim Length2 As Double
Dim rz As Double
'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 offsets to frame object
ret = SapModel.FrameObj.SetEndLengthOffset("15",
False, 12, 12, 0.5)
'assign frame object auto mesh options
ret = SapModel.FrameObj.SetAutoMesh("15",
True, False, False, 2, 0)
'create the analysis model
ret = SapModel.Analyze.CreateAnalysisModel
'get offsets for line element
ret = SapModel.LineElm.GetEndLengthOffset("15-1",
Length1, Length2, rz)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.