Add Layers to layer list?

Timothy Spangler

Usenet Archive
Joined
Mar 5, 2001
Messages
36
Reaction score
0
I want to be able to add layer names to the layer list if they are not there already i.e..

I have a list of layers in the current drawing
Layer1
Layer2
Layer3

I want to show those layers plus
Layer10
Layer11

I want these to show in a dropdown list so if they are selected then they will be created.

What I have now is:
;;; ------------ Set Layer List
(defun set_lay_list (tile / curr_lay index next_lay)

(start_list tile)
(setq lay_list ')
(setq next_lay (tblnext "layer" T))
(setq index 0)
(while next_lay
(if (= (getvar "clayer") (cdr (assoc 2 next_lay)))
(setq curr_lay index)
(setq index (1+ index))
)
(setq lay_list (append lay_list(list (cdr (assoc 2 next_lay))))) (setq next_lay (tblnext "layer")) ) (if (not(member "Layer10" lay_list)) (setq lay_list(append '("A-Wall-Window") lay_list)); Add new layers to the current list )

(mapcar 'add_list lay_list)
(end_list)
)

TIA
 

Latest threads

Back
Top