Author Topic: How to add a layer description using entmake?  (Read 5546 times)

0 Members and 1 Guest are viewing this topic.

HasanCAD

  • Swamp Rat
  • Posts: 1422
How to add a layer description using entmake?
« 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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.


CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: How to add a layer description using entmake?
« Reply #3 on: October 17, 2010, 11:56:02 AM »
You're quite welcome.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Harrie

  • Guest
Re: How to add a layer description using entmake?
« Reply #4 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

efernal

  • Bull Frog
  • Posts: 206
Re: How to add a layer description using entmake?
« Reply #5 on: October 17, 2010, 04:54:09 PM »
perhaps you must use

(regapp "AcAecLayerStandard")

before...

e.fernal
e.fernal

Harrie

  • Guest
Re: How to add a layer description using entmake?
« Reply #6 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.

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: How to add a layer description using entmake?
« Reply #7 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

Harrie

  • Guest
Re: How to add a layer description using entmake?
« Reply #8 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.
« Last Edit: October 18, 2010, 08:20:55 AM by Harrie »