cLinkObjGetTransformationMatrix Method

Retrieves the transformation matrix for a link object.

Namespace:  ETABS2016
Assembly:  ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
int GetTransformationMatrix(
	string Name,
	ref double[] Value,
	bool IsGlobal = true
)

Parameters

Name
Type: SystemString
The name of an existing link object.
Value
Type: SystemDouble
Value is an array of nine direction cosines that define the transformation matrix.

The following matrix equation shows how the transformation matrix is used to convert items from the link object local coordinate system to the global coordinate system.

|c0 c1 c2| |Local1| |GlobalX|

|c3 c4 c5| * |Local2| = |GlobalY|

|c6 c7 c8| |Local3| |Globalz|

In the equation, c0 through c8 are the nine values from the transformation array, (Local1, Local2, Local3) are an item (such as a load) in the object local coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the global coordinate system.

The transformation from the local coordinate system to the present coordinate system is the same as that shown above for the global system if you substitute the present system for the global system.

IsGlobal (Optional)
Type: SystemBoolean
If this item is True, the transformation matrix is between the Global coordinate system and the link object local coordinate system. If this item is False, the transformation matrix is between the present coordinate system, and the link object local coordinate system.

Return Value

Type: Int32
Returns zero if the link object transformation matrix is successfully retrieved; otherwise it returns a nonzero value.
Remarks
Examples
VB
Public Sub Example()
       Dim SapModel As cSapModel
       Dim EtabsObject As cOAPI
       Dim ret As Integer = -1
       Dim Name As String
       Dim Value() As Double

   'create ETABS object
       EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject")

   'start ETABS application
       ret = EtabsObject.ApplicationStart()

   'create SapModel object
       SapModel = EtabsObject.SapModel

   'initialize model
       ret = SapModel.InitializeNewModel()

   'create steel deck template model
       ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24)

   'add link object by points
       ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

   'get link object transformation matrix
       ReDim Value(8)
       ret = SapModel.LinkObj.GetTransformationMatrix(Name, Value)

   'close ETABS
       EtabsObject.ApplicationExit(False)

   'clean up variables
       SapModel = Nothing
       EtabsObject = Nothing
   End Sub
See Also