Message 1 of 7
Layer Setting code improvements requested

Not applicable
04-28-2004
05:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Below is my horrid hack of some code to create a function to recognize if a
Layer Key Override is active and to set/create the proper layer for
symbology placement:
(defun annolko (/ clayr)
(if (null AecGenerateLayerKey)
(arxload "AecLMgrLisp45")
)
(setq clayr (AecExpandLayerKey "ANNOBJ"))
(if (tblsearch "layer" clayr); is the layer there
(if (/= layer (getvar "clayer")); if layer isn't the current layer....
(setvar "clayer" clayr); make it the current layer
)
(command "_layer" "m" clayr "c" "2" "" "")
)
(princ)
)
Anyone have a more elegant way to do this :)
It works fine, but I don't want Peter Funk laughing at me forever ;)
--
Regards,
---------------
Reid M. Addis
Registered Architect
Architectural Applications Specialist
Granary Associates
411 North 20th Street
Philadelphia, PA 19130
Ph. 215-665-7056
email: addis@granaryassoc.com