TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: HasanCAD on October 14, 2010, 02:03:29 PM

Title: How to add a layer description using entmake?
Post by: HasanCAD on October 14, 2010, 02:03:29 PM
How ro add a layer description
DXF code is 1000 Xdata I tried to add as
(defun Layer (Nme)
Code: [Select]
  (entmake (list (cons 0 "LAYER")
                 (cons 100 "AcDbSymbolTableRecord")
                 (cons 100 "AcDbLayerTableRecord")
                 (cons 2 Nme)
  (cons 1000 "123")
                 (cons 70 0))))
follows but gives an error
Code: [Select]
Command: (layer nme)
; error: too few arguments
Title: Re: How to add a layer description using entmake?
Post by: CAB on October 14, 2010, 02:23:38 PM
http://www.theswamp.org/index.php?topic=33041.0
Title: Re: How to add a layer description using entmake?
Post by: HasanCAD on October 17, 2010, 04:10:04 AM
http://www.theswamp.org/index.php?topic=33041.0
Thanks CAB
Title: Re: How to add a layer description using entmake?
Post by: CAB on October 17, 2010, 11:56:02 AM
You're quite welcome.
Title: Re: How to add a layer description using entmake?
Post by: Harrie on October 17, 2010, 02:59:32 PM
http://www.theswamp.org/index.php?topic=33041.0
Thanks CAB
Notice: CreateLayer from VovKa  doesn't work in AutoCAD 2011.
The problem is the line:
(list -3 (list "AcAecLayerStandard" (cons 1000 "") (cons 1000 Desc)))

Regards
Title: Re: How to add a layer description using entmake?
Post by: efernal on October 17, 2010, 04:54:09 PM
perhaps you must use

(regapp "AcAecLayerStandard")

before...

e.fernal
Title: Re: How to add a layer description using entmake?
Post by: Harrie on October 18, 2010, 02:52:28 AM
Thanks, with (regapp "AcAecLayerStandard") the program CreateLayer
http://www.theswamp.org/index.php?topic=35302.0 using entmake works.
Title: Re: How to add a layer description using entmake?
Post by: HasanCAD on October 18, 2010, 07:04:41 AM
Thanks, with (regapp "AcAecLayerStandard") the program CreateLayer
http://www.theswamp.org/index.php?topic=35302.0 using entmake works.

You are posting a link to the same thread
Title: Re: How to add a layer description using entmake?
Post by: Harrie on October 18, 2010, 08:10:15 AM
Thanks, with (regapp "AcAecLayerStandard") the program CreateLayer
http://www.theswamp.org/index.php?topic=35302.0 using entmake works.

You are posting a link to the same thread
Yes, because in an answer I had said:
Notice: CreateLayer from VovKa  doesn't work in AutoCAD 2011.
The problem is the line:
(list -3 (list "AcAecLayerStandard" (cons 1000 "") (cons 1000 Desc)))
and E. Fernal answered: Perhaps you must use
(regapp "AcAecLayerStandard") before...
And my conclusion is: it works.

Regards.