BlockInstanceXform

Returns 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

rhinoscriptsyntax.BlockInstanceXform (object_id)

rhinoscript.block.BlockInstanceXform (object_id)

Parameters

object_id

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

Returns

list

A transformation matrix (4x4 array of numbers) if successful.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select block to query")

if rs.IsBlockInstance(obj):

    arrMatrix = rs.BlockInstanceXform(obj)

    if arrMatrix is not None:

        pointId = rs.AddPoint([0,0,0])

        rs.TransformObject( pointId, arrMatrix)

Also See

BlockInstanceCount

BlockInstanceInsertPoint

BlockInstances

IsBlockInstance