Create Block from Selection

AuthorIMSI/SoftDev [Prev] [Next] by Author
CategoryGraphic - Create [Prev] [Next] by Category
Keywords:
Type (Source?)Macro (VBA)
LicenceExample
StatusTo be reviewed


Description:

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.



This macro should be available in your 'Macros' folder

Comments:




Download: .../IMSI/VBA/Blocks.zip (27KB)
More Info: http://www3.imsisoft.com/turbocad/tcsdk/


Email Comment. Use this link to email comments, corrections, additional information etc for this topic.

URL of this page: <A href ='http://www.bcitool.com/TCDRC/?Pages/Page_00149.htm' target = '_blank'>TCDRC - Page 00149</A>