Inserts a block whose definition already exists in the document.
rhinoscriptsyntax.InsertBlock(block_name, insertion_point, scale=[1,1,1], angle_degrees=0, rotation_normal=[0,0,1])
rhinoscriptsyntax.InsertBlock2(block_name, xform)
rhinoscript.block.InsertBlock(block_name, insertion_point, scale=[1,1,1], angle_degrees=0, rotation_normal=[0,0,1])
rhinoscript.block.InsertBlock2(block_name, xform)
block_name |
Required. String. The name of the block definition to insert. |
insertion_point |
Required. List or ON_3dPoint. The 3-D insertion point of the block. |
scale |
Optional. Array. An array of three numbers that identify the x,y,z scale factors. If omitted, the block is not scaled. |
angle_degrees |
Optional. Number. The rotation angle in degrees. If omitted, the block is not rotated. |
rotation_normal |
Optional. Array. A 3-D vector identifying the axis of rotation. If omitted and dblAngle is specified, the world Z axis is used. |
xform |
Required. Array. 4x4 transformation matrix to apply. |
Guid |
The identifier of the newly inserted block instance, if successful. |
import rhinoscriptsyntax as rs
name = rs.GetString("Name of block to insert")
if rs.IsBlock(name):
rs.InsertBlock( name, [0,0,0], [2,2,2], 45.0)