SapObject.SapModel.PointElm.GetRestraint
Function GetRestraint(ByVal Name As String, ByRef Value() As Boolean) As Long
Name
The name of an existing point element.
Value
This is an array of six restraint values.
Value(0) = U1
Value(1) = U2
Value(2) = U3
Value(3) = R1
Value(4) = R2
Value(5) = R3
This function retrieves the restraint assignments for a point element. The restraint assignments are always returned in the point local coordinate system.
The function returns zero if the restraint assignments are successfully retrieved, otherwise it returns a nonzero value.
Sub GetPointElmRestraints()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Boolean
'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)
'create analysis model
ret = SapModel.Analyze.CreateAnalysisModel
'get point element restraints
Redim Value(5)
ret = SapModel.PointElm.GetRestraint("5",
Value)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.