Author | IMSI/SoftDev | [Prev] [Next] by Author |
Category | Graphic - Create | [Prev] [Next] by Category |
Keywords: | ||
Type (Source?) | Macro (VBA) | |
Licence | Example | |
Status | To be reviewed |
Description
This example shows how to create Block objects with the Selection Object. This macro demonstrates how to display object properties in a user form as well as iterate through Application, Drawing and Graphic object properties.
This macro uses the following objects: Block, BoundingBox, Graphic, Graphics, Layer, Selection, and Vertex.
Build Instructions
Download and unzip the archive. Add a new project named "CreateBlock" to any TurboCAD drawing, and attach the Blocks.tcm file. Select the objects that you wish to create a block from.
Run the MakeBlockFromSelection macro to create a block and insert it into the drawing. Run the ShowSelForm macro to see details about any graphic selected in the drawing. Click on Fill Tree to see the selection info tree. Click on Show Vertices to see the vertices of the selection. Click on Clear Layer to remove the vertices. To save the selection data to a file, input a filename in the Filename field and click on Save to File.
Three other macros show you Application, Drawing and Selection object properties in the VBA debug immediate window.