Viewing AutoCAD Objects
Visual Lisp has a great way of letting you view AutoCAD Objects by allowing you to "walk" through the drawing database. Let's have a wee look at what's on offer. Open AutoCAD with a blank drawing, and then open the Visual Lisp Editor. Let's set up what information we would like to see first :
From the Visual LISP editor pull-down menu, select
Click the "Diagnostic" tab in the "General Options" window.
Check "Inspect drawing objects verbosely", if not already checked, to view detailed entity information. Now click "OK".
Now select
The "Drawing Tables" Inspection window will now open :
That's very nice!! We have a list of the symbol tables in our drawing. Now, double-click on <Layers> :
Even better! Now we've got a list of all the Layers in our drawing. Double-click on a layer name :
Crikey, now we've got a list of all the Layers attributes "including" the AutoLisp Entity list!
Now draw a line, a circle, and some text anywhere in your drawing and then select
. The following Inspect window will open :Now double-click on <MTEXT> :
Now we've got a list of all the text attributes.
Just one more so that you get the idea. This time choose
. The AutoCAD window will appear prompting you to select objects. Select all three objects :A list of all entities contained in your selection set will be displayed. This time double-click on the <LINE> object :
Again a list of the Objects attributes are displayed. Insert a few more Objects into your drawing such as blocks, blocks with attributes, polylines, hatches,etc. This set of tools gives you a good idea of how the AutoCAD Object Model is put together. Play around the them, you'll learn a lot…