SapObject.SapModel.PointElm.GetPatternValue
Function GetPatternValue(ByVal Name As String, ByVal PatternName As String, ByRef Value As Double) As Long
Name
The name of an existing point element.
PatternName
The name of a defined joint pattern.
Value
The value that the specified point element has for the specified joint pattern.
This function retrieves the joint pattern value for a specific point element and joint pattern.
The function returns zero if the value is successfully retrieved, otherwise it returns a nonzero value.
Joint pattern values are unitless.
Sub GetPointElmPatternData()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Value 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)
'add joint pattern assignment
ret = SapModel.PointObj.SetPatternByXYZ("ALL",
"Default", 0, 0, 10, 0, Group)
'create analysis model
ret = SapModel.Analyze.CreateAnalysisModel
'get joint pattern assignment for point element
ret = SapModel.PointElm.GetPatternValue("3",
"Default", Value)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.