• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

weird text creation with entmake

  • Thread starter Thread starter Ulisse77
  • Start date Start date

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? :confused:
 
72 type of justification of horizontal text (optional, default = 0); whole codes (not bit coded):

0 = left; 1= center; 2 = right;
3 = aligned (if vertical alignment = 0);
4 = centered (if vertical alignment = 0);
5 = adapted (if vertical alignment = 0).

73 type of justification of the vertical text (optional, default = 0); whole codes (not bit coded):

0 = base line; 1 = low; 2 = half; 3 = high.



in the table below are described in detail the group codes 72 (horizontal alignment) and 73 (vertical alignment).
201.webpif the values of group codes 72 and/or 73 are different from zero, the values of the first alignment point are ignored and the new values are calculated according to the second alignment point and the length and height of the text string (after the application of the text style). if the values of group codes 72 and 73 are lacking or equal to zero, the second alignment point is not significant.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top