Entity Data
List LISP for IntelliCAD Users |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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.
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...
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.
|
|
|
Copyright © 1998-2001 DBM & others | Disclaimer | Privacy | Re-publication | Trademarks | Webmaster | Home |