SapObject.SapModel.TendonObj.GetTendonData
Function GetTendonData(ByVal Name As String, ByRef NumberPoints As Long, ByRef MyType() As Long, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double, Optional ByVal CSys As String = "Global") As Long
Name
The name of a defined tendon object.
NumberPoints
The number of items used to define the tendon geometry.
MyType
This is an array of values that are 1, 3, 6, 7, 8, or 9, indicating the tendon geometry definition parameter for the specified point.
1 = Start of tendon
2 = The segment preceding the point is linear
6 = The specified point is the end of a parabola
7 = The specified point is an intermediate point on a parabola
8 = The specified point is the end of a circle
9 = The specified point is an intermediate point on a parabola
The first point always has a MyType value of 1.
MyType of 6 through 9 is based on using three points to calculate a parabolic or circular arc. MyType 6 and 8 use the specified point and the two previous points as the three points. MyType 7 and 9 use the specified point and the points just before and after the specified point as the three points.
x
This is an array of the X (or local 1) coordinate of each point in the coordinate system specified by CSys. [L]
y
This is an array of the Y (or local 2) coordinate of each point in the coordinate system specified by CSys. [L]
z
This is an array of the Z (or local 3) coordinate of each point in the coordinate system specified by CSys. [L]
CSys
This is the coordinate system in which the x, y and z coordinate parameters are defined. It is Local or the name of a defined coordinate system.
Local means that the point coordinates are in the local system of the specified tendon object with the origin assumed to be at the I-End of the tendon.
This function retrieves the tendon geometric definition parameters for a tendon object.
The function returns zero if the tendon object parameters are successfully retrieved, otherwise it returns a nonzero value.
Sub GetTendonGeometryDefinitionData()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim MyType() As Long
Dim x() As Double
Dim y() As Double
Dim z() 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,
2, 144, 2, 288)
'add tendon object by coordinates
ret = SapModel.TendonObj.AddByCoord(-288,
0, 288, 288, 0, 288, Name)
'set tendon geometry
NumberPoints = 3
ReDim MyType(NumberPoints -
1)
ReDim x(NumberPoints - 1)
ReDim y(NumberPoints - 1)
ReDim z(NumberPoints - 1)
MyType(0) = 1
MyType(1) = 7
MyType(2) = 6
x(0) = 0: y(0) = 0
x(1) = 288: y(1) = -12
x(2) = 576: y(2) = 0
ret = SapModel.TendonObj.SetTendonData(Name,
NumberPoints, MyType, x, y, z, "Local")
'update view
ret = SapModel.View.RefreshView(0,
False)
'get tendon geometry definition data
ReDim MyType(0)
ReDim x(0)
ReDim y(0)
ReDim z(0)
ret = SapModel.TendonObj.GetTendonData(Name,
NumberPoints, MyType, x, y, z, "Global")
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.