AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

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 :

  • Choose "Tools" - "Environment Options" - "General Options".
  • Click the "Diagnostic tab" in the "General Options" window.
  • Select "Inspect Drawing Objects Verbosely to view detailed entity information.
  • Now choose "View" - "Browse Drawing Database" - "Browse Tables".

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 Layer <2> :

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 "View" - "Browse Drawing Database" - "Browse All Entities". The following Inspect window will open :

Now double-click on <TEXT> :

Now we've got a list of all the text attributes.

Just one more so that you get the idea. This time choose "View" - "Browse Drawing Database" - "Browse Selection". The AutoCAD window will appear prompting you to select objects. Do just that :

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........

 
The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website