inspecting values with autolisp in AutoCAD

Inspect windows show information about AutoLISP objects and AutoCAD objects stored in symbols in your program. You can inspect AutoLISP entities such as strings, numbers, lists and symbols as well as AutoCAD objects such as a polyline, block definition, or selection set.

For example, if you inspect the number 360, you will see the following window showing the value of the integer in binary, octal, decimal, hexadecimal and character formats.

To inspect an object

1. Highlight the object you want to inspect.

2. Start the Inspect command.

3. If there is additional information you can double-click on the object in the Inspect window and it will bring up the next Inspect window.

4. Or… You can start Inspect without anything highlighted and pick from the Inspect dialog box or type in the object name.


  • If you select an AutoLISP expression, Inspect will process the function and return the final value. For example,
    (setq YCEN (cadr CP))
    will show a real number in the Inspect window as long as CP was a point list.
  • You can have any number of inspect windows open at one time.


In this practice you will inspect the values of objects in an AutoLISP file and then select an AutoCAD object and inspect its value. Estimated time for completion: 5 minutes.

1. Continue using SAW.LSP

See also  Automatic Loading of LISP Files

2. Highlight the line (setq ANG1 (/ 360 NT)) and choose Inspect.

3. Highlight each component of that same line and inspect them. What sort of information do you get in the Inspect window for each of these?

4. In AutoCAD draw a polyline.

5. In a blank AutoLISP file type in the following line:
(setq ENT1 (entsel “\nselect an object: “))

6. Load this function and select the polyline you drew.

7. Go back to Visual LISP, highlight the symbol ENT1 and inspect it.

8. Double-click on the Entity name. Drill down as far as you can. Notice how many inspect windows you can get from one object.

Back to top button