Use an appropriate vla-add* function with the Block argument derived from the ObjectDBX Document to create your objects as opposed to using entmake(x) - see Example 1 from here for an example of how to accomplish this.
Hi Lee
Thanks for sparing time to reply.
I just want to assign an owner when making a new object or entity using entmakex.
I know that Using an appropriate
vla-add* function can do the job but,using
entmakex can obtain speed
more then
vla-add* the follow code is used in your Burstupgrade.lsp
(defun LM:burst:att2text ( enx )
(entmakex
(append '((0 . "TEXT"))
(LM:burst:removepairs '(000 002 070 074 100 280)
(subst (cons 73 (cdr (assoc 74 enx))) (assoc 74 enx) enx)
)
)
)
)
(defun LM:burst:matt2mtext ( enx )
(entmakex
(append '((0 . "MTEXT") (100 . "AcDbEntity") (100 . "AcDbMText"))
(LM:burst:remove1stpairs '(001 007 010 011 040 041 050 071 072 073 210)
(LM:burst:removepairs '(000 002 042 043 051 070 074 100 101 102 280 330 360) enx)
)
)
)
)
As you said,I got the Block argument (OwnrObj) derived from the ObjectDBX Document to create the owner objects,
then
(entmakex
(append (list '(0 . "TEXT") (cons 330 OwnrObj))
(LM:burst:removepairs '(000 002 070 074 100 280)
(subst (cons 73 (cdr (assoc 74 enx))) (assoc 74 enx) enx)
)
)
)
but the entities is in fact maked in the activedocument(etc. the drawing which run the lisp codes).
refer to the help topic
Examples
_$ (entmakex '((0 . "CIRCLE") (62 . 1) (10 4.0 3.0 0.0) (40 . 1.0)))
<Entity name: 1d45558>
Warning:
Objects and entities without owners are not written out to DWG or DXF files.
Be sure to set an owner at some point after using entmakex .
For example, you can use dictadd to set a dictionary to own an object.
So the questions are ,
how to handle this owners?
how to understand DXF code 330(soft pointer)and 360(hard pointer)?
If need to handle dictionary ,is there any example?