PDA

View Full Version : Using LISP to work with Layer Keys



RobertB
2008-04-29, 05:46 PM
There is an .arx module that may be loaded that will provide some additional AutoLISP functions to help with layer keys. Although the documentation is somewhat dated, the functions are still useful.

The .arx module is AecMgrLisp.arx as of AutoCAD Architectural/MEP 2009.

The following sample code purges existing layer key styles and then loads the specified style.


(cond ((not (member "aeclmgrlisp.arx" (arx))) (arxload "AecLMgrLisp")))
(setq keyName "Sparling Version 3.2") ; <- this is the current layer key
(command "AecPurgeLayerStyles" "_y")
(AecImportLayerKeyingStyle
"P:\\Acad\\Layer Standards\\Sparling Layer Standard.dwg"
keyName)
(AecSetCurrentLayerKeying keyName)

A description of the functions is attached.