Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACAD layer states

Status
Not open for further replies.

JacobY

Programmer
Jul 27, 2002
6
0
0
US
I was wondering if anyone had any information on this extension dictionary. I am programming a layer comparison tool and am at wit's end on how to access the saved layer names and values in each saved layer state. I am using AutoCAD 2002. I am trying to compare the current layer collection with a saved layer state...

Thanks much in advance.

Jacob
 
I'm not sure what you are trying to accomplish, since I don't worry about what layers are saved; I usually try to purge anything that isn't needed. However, if you use the routine:

(setq layer_find (tblnext "LAYER" 0))
(while (/= nil (setq layer_find (cdr (assoc 2 (tblnext "LAYER")))))
(if ss_text (setq ss_text (append ss_text (list layer_find)))
(setq ss_text (list layer_find))))

You will create a list of the Layers that you can step through with the following and pull information from them just as you would wblocks or text or anything else:

(while (/= nil (cdr ss_text))
(setq layer_name (car ss_text))

Pull the information in this section until the following line becomes nil:

(setq ss_text (cdr ss_text)))

I hope this was of some help. I don't know the flag for a saved layer, but all of the data is pulled with the following syntax, if you key:

(setq layer_find (tblnext "LAYER" 0))

You get:

((0 . "LAYER") (2 . "0") (70 . 0) (62 . 7) (6 . "Continuous"))

62 is color, 6 is linetype, and not all of the flags are shown in that list.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top