Entmake Text Problem

Entmake Text Problem

Anonymous
Not applicable
1,283 Views
2 Replies
Message 1 of 3

Entmake Text Problem

Anonymous
Not applicable

I'm trying to use entmake to instert a simple bit of text at a certain point.

The text needs to be justified Middle Centre.

 

I'm having trouble getting the 72 & 73 codes correct.

 

The code works with the lines below semi coloned off but the text is justified left.

 

Without the semi colons the text gets inserted at 0,0 instead of the point 'ins'

 

        (entmake 
            (list                     
               '(000 . "TEXT")
               '(100 . "AcDbEntity")
               '(100 . "AcDbMText")
    		(cons 10 ins)         		;; Insertion point
               '(001 . "My Text Here")		;; Contents
               	(cons 040 hght)			;; Text Height
             	(cons 050 txtrot)		;; Rotation
;             	(cons 072 4)
;	        (cons 073 4)
            )
        )

 

 

Has any kind person got any ideas?

0 Likes
Accepted solutions (1)
1,284 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution

See this for correct codes. Also you need to add code 11, same as 10... a difference is calculated automatically.

 

(entmake (list 
	    '(000 . "TEXT")
	    '(100 . "AcDbEntity")
	    '(100 . "AcDbMText")
	    (cons 10 ins)         		;; Insertion point
	    (cons 11 ins)         		;; Alignment point
	    '(001 . "My Text Here")		;; Contents
	    (cons 040 hght)			;; Text Height
	    (cons 050 txtrot)			;; Rotation
	    (cons 072 1)
	    (cons 073 2)
	 ))

 

This might be helpful as well. 

Message 3 of 3

Anonymous
Not applicable

Bang on, thank you very much BeekeeCZ

0 Likes