SapObject.SapModel.PointElm.GetSpringCoupled
Function GetSpringCoupled(ByVal Name As String, ByRef k() As Double) As Long
Name
The name of an existing point element.
k
This is an array of twenty one spring stiffness values.
Value(0) = U1U1 [F/L]
Value(1) = U1U2 [F/L]
Value(2) = U2U2 [F/L]
Value(3) = U1U3 [F/L]
Value(4) = U2U3 [F/L]
Value(5) = U3U3 [F/L]
Value(6) = U1R1 [F/rad]
Value(7) = U2R1 [F/rad]
Value(8) = U3R1 [F/rad]
Value(9) = R1R1 [FL/rad]
Value(10) = U1R2 [F/rad]
Value(11) = U2R2 [F/rad]
Value(12) = U3R2 [F/rad]
Value(13) = R1R2 [FL/rad]
Value(14) = R2R2 [FL/rad]
Value(15) = U1R3 [F/rad]
Value(16) = U2R3 [F/rad]
Value(17) = U3R3 [F/rad]
Value(18) = R1R3 [FL/rad]
Value(19) = R2R3 [FL/rad]
Value(20) = R3R3 [FL/rad]
This function retrieves coupled spring stiffness assignments for a point element.
The spring stiffnesses reported are the sum of all springs assigned to the point element either directly or indirectly through line, area and solid spring assignments. The spring stiffness values are reported in the point local coordinate system.
The function returns zero if the stiffnesses are successfully retrieved, otherwise it returns a nonzero value. If no springs exist at the point element, the function returns a nonzero value.
Sub GetPointElmCoupledSpring()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim k() 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 coupled spring to a point
ReDim k(20)
k(2) = 10
k(17) = 4
ret = SapModel.PointObj.SetSpringCoupled("3",
k)
'create analysis model
ret = SapModel.Analyze.CreateAnalysisModel
'get point element coupled spring values
ReDim k(20)
ret = SapModel.PointElm.GetSpringCoupled("3",
k)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.