Page 1 of 1

Create Layer problem R2012

Posted: Mon Dec 03, 2012 12:07 pm
by dndaas
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

Re: Create Layer problem R2012

Posted: Mon Dec 03, 2012 8:12 pm
by nuntius
Hi Marc,

I haven't used AutoLISP in years and so can't really help you.
This list of other AutoLISP forums may be more helpful.