Create Layer problem R2012
Posted: Mon Dec 03, 2012 12:07 pm
Hi Lisp-ers,
I’ve got a lisp routine that creates a layer, sets the color, weight and specially the description.
It works perfectly in AutoCAD2010. Now I’m upgrading to AutoCAD 2012 and the program will not work….
Can anybody help my, with correcting my program, or sharing another working one?
(defun CreateLayer (Name FrzLock Color LType Plot LWeight Desc)
(entmakex
(list (cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 Name)
(cons 70 FrzLock)
(cons 62 Color)
(cons 6 LType)
(cons 290 Plot)
(cons 370 LWeight)
(list -3 (list "AcAecLayerStandard" (cons 1000 "") (cons 1000 Desc)))
)
)
(setvar "CLAYER" Name)
)
Thank you,
Marc
I’ve got a lisp routine that creates a layer, sets the color, weight and specially the description.
It works perfectly in AutoCAD2010. Now I’m upgrading to AutoCAD 2012 and the program will not work….
Can anybody help my, with correcting my program, or sharing another working one?
(defun CreateLayer (Name FrzLock Color LType Plot LWeight Desc)
(entmakex
(list (cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 Name)
(cons 70 FrzLock)
(cons 62 Color)
(cons 6 LType)
(cons 290 Plot)
(cons 370 LWeight)
(list -3 (list "AcAecLayerStandard" (cons 1000 "") (cons 1000 Desc)))
)
)
(setvar "CLAYER" Name)
)
Thank you,
Marc