@Anonymous wrote:
....
brouchure layer /black line layer starts with "B" and Working drawing layer starts with "W"
i want to show only working drawing layer when i type "WD" and Brouchure layer to show up when type "BD". ….
Try something like these, using the wildcard * to get all Layers starting with the letter that precedes it, in both the On and Off options:
(defun C:WD ()
(command "_.layer"
"_thaw" "0" "_set" "0" ;;; assuming that can be on in any case
"_on" "W*" "_off" "B*" ""
)
(princ)
)
(defun C:BD ()
(command "_.layer"
"_thaw" "0" "_set" "0" ;;; assuming that can be on in any case
"_on" "B*" "_off" "W*" ""
)
(princ)
)
If you want to have one of the W... Layers set current in the WD command, rather than Layer 0, there would need to be either:
1) a way of giving it a Layer name starting with W that you know will always be in the drawing, or;
2) more complex code, to find such a Layer name [certainly possible].
And likewise with a B... Layer in the BD command.
They thaw Layer 0 before setting it current, in case it may be frozen at the time [in which case it would not be able to be made current]. They don't deal with whatever you may want to do, if anything, with any additional Layers that may exist starting with other characters.
Kent Cooper, AIA