Returns or sets the location of a block instance relative to the world coordinate system origin (0,0,0). The position is returned as a 4x4 transformation matrix
Rhino.BlockInstanceXform (strObject [, arrXform])
strObject |
Required. String. The identifier of an existing block insertion object. |
arrXform |
Optional. Array. A new transformation matrix to set on the block instance. |
Array |
If a transform is not specified, the current transformation matrix (4x4 array of numbers) if successful. |
Array |
If a transform is specified, the previous transformation matrix (4x4 array of numbers) if successful. |
Null |
If not successful, or on error. |
Dim strObject, arrMatrix, strPoint
strObject = Rhino.GetObject("Select block to query")
If Rhino.IsBlockInstance(strObject) Then
arrMatrix = Rhino.BlockInstanceXform(strObject)
If IsArray(arrMatrix) Then
strPoint = Rhino.AddPoint(Array(0,0,0))
Rhino.TransformObject strPoint, arrMatrix
End If
End If