Message 1 of 3
Insert block with "entmake" on new drawings...

Not applicable
10-20-2019
03:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys,
Im trying to insert a block with entmake, it's working, but only if the drawing already know the path of the block .dwg.
Obviously, when i create a new drawing, this code won't work, unless i insert at least one block with the "insert" command.
The code...
(entmake (list
'(0 . "INSERT")
'(66 . 0);
(cons 2 "blockname") ;i can't put the path in here.
(cons 10 basepoint)
(cons 41 fator); X
(cons 42 fator); Y
(cons 43 fator); Z
(cons 50 0);
(cons 210 (list 0.0 0.0 1.0)))))
I could use
(command "_.insert" "C:\\blocks\\blockname.dwg" basepoint "" "" "")
because i can specify the path.
Is there a way i can use the entmake and specify the block path so i can use the entget code on new drawings ?
Many thanks.