Ulisse77
Guest
Hello everyone,
I realized something strange.
I have to use the function entmake for the creation of a text type entity.
if in the list of the entity that I have to create, specific the field dxf 72 and the field dxf 73 both to zero, the insertion of the text takes place in the point expressed from the field dxf 10 present in the list.
if instead the fields dxf 72 and 73 are at least one of two different from zero, then the insertion of the text takes place on a seemingly causal point, which is not at all the one specified in the list.
I bring you back here under the code I used: :mixed:
(defun c:test ( / pt lent)
(setq pt (list 100.0 100.0 0.0)
(setq lent (cons 0 "text")
(cons 10 pt) ; text entry point
(quote (41 . 1.0)
(quote (51 . 0.0)
; ///////////// dxf fields charged! //////////
(quote (72 . 1))
(quote (73 . 0))
////////////////////////////////////////////////////////////
(cons 1 "proof")
(cons 40 0.18)
)
)
(entmake lent)
(setq lent (entget))
(alert (strcat "point insertion pt = " (vl-princ-to-string pt)))
(alert (strcat "point insertion (entlast) = " (vl-princ-to-string (cdr (assoc 10 lent))))))
(princ)
)
Would you give me an explanation of this bizarre behavior?
I realized something strange.
I have to use the function entmake for the creation of a text type entity.
if in the list of the entity that I have to create, specific the field dxf 72 and the field dxf 73 both to zero, the insertion of the text takes place in the point expressed from the field dxf 10 present in the list.
if instead the fields dxf 72 and 73 are at least one of two different from zero, then the insertion of the text takes place on a seemingly causal point, which is not at all the one specified in the list.
I bring you back here under the code I used: :mixed:
(defun c:test ( / pt lent)
(setq pt (list 100.0 100.0 0.0)
(setq lent (cons 0 "text")
(cons 10 pt) ; text entry point
(quote (41 . 1.0)
(quote (51 . 0.0)
; ///////////// dxf fields charged! //////////
(quote (72 . 1))
(quote (73 . 0))
////////////////////////////////////////////////////////////
(cons 1 "proof")
(cons 40 0.18)
)
)
(entmake lent)
(setq lent (entget))
(alert (strcat "point insertion pt = " (vl-princ-to-string pt)))
(alert (strcat "point insertion (entlast) = " (vl-princ-to-string (cdr (assoc 10 lent))))))
(princ)
)
Would you give me an explanation of this bizarre behavior?
