BlockInstanceXform

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

Syntax

Rhino.BlockInstanceXform (strObject [, arrXform])

Parameters

strObject

Required.  String.  The identifier of an existing block insertion object.

arrXform

Optional.  Array.  A new transformation matrix to set on the block instance.

Returns

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.

Example

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

Also See

BlockInstanceCount

BlockInstanceInsertPoint

BlockInstances

IsBlockInstance