Return to the Design Drawing homepage SearchSubscribe

Click here!

[FrontPage Include Component]

Entity Data List
- the key to direct entity modification in IntelliCAD

LISP for IntelliCAD Users

Tips & Techniques

IntelliCAD, LISP, drawing data, entity data, entities, automation

 

Entity data is the basic information that defines an entity in the IntelliCAD database. For every entity in an IntelliCAD drawing there is an entity data list. It is the database record that contains all the information about that entity. By accessing this information directly through LISP it is possible and easy to automate the modification of drawings.

The entity data list can be accessed, modified and rewritten to the database using LISP. This article describes the entity data list, shows you what it looks like and how to read it.

LISP code can entered directly into IntelliCAD by typing it in at the command window. For the sake of our example, a text entity selected in IntelliCAD using the following LISP code...

(setq entity (entget (car (entsel "Pick an entity: "))))

...would return the entity data list similar to this...

((-1 . <Entity name: 20f25fc>) (0 . "TEXT") (5 . "176B") (67 . 0) (8 . "T1") (62 . 256) (6 . "BYLAYER") (48 . 1.00000) (60 . 0) (39 . 0.000000) (10 -1063.03 864.159 0.000000) (40 . 9.60000) (1 . "hello") (50 . 0.000000) (41 . 2.00000) (51 . 0.000000) (7 . "ROMANS") (71 . 0) (72 . 4) (11 -1029.63 868.959 0.000000) (73 . 0))

Let's examine each list element in more detail. Most of the data is in an association list format of dotted pairs. The first element of the dotted pair is code or key data which corresponds to group codes used to describe data in DXF files.

List lines Explanation of DXF group codes returned in this entity list
DXF data. Opt=optional. Default value
- valid values
((-1 . <Entity name: 20f25fc>) Entity name
(0 . "TEXT") Entity type
(5 . "176B") Entity handle
(67 . 0) Space. Opt. 0
- 0 Modelspace
- 1 Paperspace
(8 . "T1") Layer name
(62 . 256) Color number
(6 . "BYLAYER") Linetype
(48 . 1.00000)  
(60 . 0)  
(39 . 0.000000) Entity thickness
(10 -1063.03 864.159 0.000000) Insertion point
(40 . 9.60000) Height
(1 . "hello") Text value
(50 . 0.000000) Rotation angle. Opt. 0
(41 . 2.00000) Relative X-scale factor. Opt. 0
(51 . 0.000000) Obliquing angle. Opt.0
(7 . "ROMANS") Style name, Opt. "STANDARD"
(71 . 0) Text generation. Opt. 0
- 2 Text backward
- 4 Text upsidedown
(72 . 4) Horizontal alignment. Opt. 0
- 0  Left
- 1 Center
- 2 Right
- 3 Aligned (if vertical=0)
- 4 Middle (if vertical=0)
- 5 Fit (if vertical=0)
(11 -1029.63 868.959 0.000000) Alignment point
(210 0.000000 0.000000 1.00000) Extrusion direction (X, Y, Z)
(73 . 0)) Vertical alignment. Opt. 0
- 0 Baseline
- 1 Bottom
- 2 Middle
- 3 Top

This data is created and normally accessed through various standard user interface controls within IntelliCAD. For example some of this entity data (which is s string of text) could be accessed and modified this way...

  1. pick the entity on the graphics screen
  2. right mouse click to bring up the shortcut menu
  3. select Properties
  4. view the Entity Properties dialog box and make changes as required...

Entity properties dialog box
Some of the entity data list above is revealed in the Entity Properties dialog accessed with the ENTPROP command in IntelliCAD

One-off or occasional changes can be made through the Entity Properties dialog. Simply moving an entity will result in entity data being updated by IntelliCAD. Manuipulating the entity data list is not the only way to modify entoties, nor is the always the best way. It is just one way; which may be appropriate, depending on the circumstances.

Where similar changes are required to many entities or across a broad scope of properties it is more conventient to automate the changes with LISP. This is demonstrated simply in a routine documented here CHGTEXT.LSP.

If this article raises more questions than it answers, you probably want to know more about DXF group codes. Another article will soon follow in this subject, so be sure to subscribe to be notified when this article is posted.

 

Thousands of free LISP programs...
LISP Library

Tell a friend
about this
article
How do you rate this article?
          
Hmmm | OK | Good | Yes! | Brilliant

Copyright © 1998-2001 DBM & others | Disclaimer | Privacy | Re-publication | Trademarks | Webmaster | Home