SapObject.SapModel.PointObj.GetCoordCylindrical
Function GetCoordCylindrical(ByVal Aame As String, ByRef r As Double, ByRef Theta As Double, ByRef z As Double, Optional ByVal Csys As String = "Global") As Long
Name
The name of a defined point object.
r
The radius for the specified point object in the specified coordinate system. [L]
Theta
The angle for the specified point object in the specified coordinate system. The angle is measured in the XY plane from the positive X axis. When looking in the XY plane with the positive Z axis pointing toward you, a positive Theta angle is counter clockwise [deg]
z
The Z-coordinate of the specified point object in the specified coordinate system. [L]
Csys
The name of a defined coordinate system. If Csys is not specified, the Global coordinate system is assumed.
The function returns zero if the coordinates are successfully returned; otherwise it returns nonzero. If successful, the function returns the r, theta and z coordinates of the specified point object in the Present Units. The coordinates are reported in the coordinate system specified by CSys.
Sub GetPointCoordCylindrical
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim r As Double, Theta As Double, z
As Double
Dim ret As Long
'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
'start a new template model
ret = SapModel.File.New2DFrame(PortalFrame,
3, 124, 3, 200)
'get point coordinates of the point named "1"
and display in a message box
ret = SapModel.PointObj.GetCoordCylindrical("1",
r, Theta, z)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.