Create Layer problem R2012

Discussion of other Lisp dialects (Arc, Clojure, AutoLisp, XLISP, etc.)
Post Reply
Posts: 1
Joined: Fri Nov 30, 2012 7:12 am

Create Layer problem R2012

Post by dndaas » 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)
(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,

Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: Create Layer problem R2012

Post by nuntius » Mon Dec 03, 2012 8:12 pm

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.

Post Reply