Adds a new block definition to the document.
Rhino.AddBlock (arrObjects, arrPoint [, strName [, blnDelete]])
arrObjects |
Required. Array. The identifiers of one or more objects that will be included in the block definition. Note, the specified objects will be copied. |
arrPoint |
Required. Array. The 3-D base point of the block definition. |
strName |
Optional. String. The name of the block definition to add. If omitted, a name will be automatically generated. Note, if the name of the block definition already exists, then the existing block definition will be modified. |
blnDelete |
Optional. Boolean. Delete the input objects. By default, input objects will not be deleted (False). |
String |
The name of the newly created block definition, if successful. |
Null |
If not successful, or on error. |
Dim arrObjects, arrPoint, strBlock
arrObjects = Rhino.GetObjects("Select objects to define block")
If IsArray(arrObjects) Then
arrPoint = Rhino.GetPoint("Block base point")
If IsArray(arrPoint) Then
strBlock = Rhino.AddBlock(arrObjects, arrPoint,,True)
Call Rhino.InsertBlock(strBlock, arrPoint)
End If
End If