CAD/CAM discussion forum > CAD Tutorial & Tips > How to use entmakex in ZWCAD+ lisp routine

How to use entmakex in ZWCAD+ lisp routine

    
  Subscribe Topic

Rank: 1

GTeng

Newbie

posts: 9

Registered: 2012-9-8

Message 1 of 4

 How to use entmakex in ZWCAD+ lisp routine
08-09-2012 12:26 . pm   |   View his/her posts only
How to use entmakex in ZWCAD+ lisp routine? What's wrong with this routine applied to ZWCAD 2012 +?


(if (null (tblsearch "LAYER" (getvar "USERS3")))
(entmake
(list
(cons 0 "LAYER")
(cons 2 (getvar "USERS3"))
(cons 70 0)
(cons 62 7)
(cons 6 "Continuous")
)
)
)


Thanks.

Rank: 1

seav735587

Newbie

posts: 9

Registered: 2012-9-7

Message 2 of 4

10-09-2012 12:25 . am   |   View his/her posts only
Corrected code:

(if (null (tblsearch "LAYER" (getvar "USERS3")))
(entmake
(list
(cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 (getvar "USERS3"))
(cons 70 0)
(cons 62 7)
(cons 6 "Continuous")
)
)
)

You can discover necessary DXF groups by reading existing layers.
For example:
(entget (tblobjname "LAYER" "0"))

Rank: 1

GTeng

Newbie

posts: 9

Registered: 2012-9-8

Message 3 of 4

11-09-2012 10:43 . am   |   View his/her posts only
Thank you, it worked well.

Rank: 8Rank: 8

Jenny

Super Moderator

posts: 526

Registered: 2013-5-6

Message 4 of 4

See also
X