I'm using the following as part of an automated suite of LISPS to label, place and orient text annotations:
Code:
(defun DTextEntMake ( TxIN Ang2 Tx cst / )
(setq lay (strcat lay "_txt"))
(entmake
(list
'(0 . "Text")
(cons 7 "OPA_DEPTH_TEXT")
(cons 40 0.35)
(cons 8 lay)
(cons 1 Tx)
(cons 10 TxIN)
(cons 50 ang2)
)
)
(command "chprop" "l" "" "a" "y" "")
)
So I flip text around inside the other routines without having to have two separate insertion point references, for ends of line etc, and to help passing text objects from CAD into e.g.QGIS, I wanted to use a middle-centre definition for the text, so I assumed the following would change it:
Code:
(defun DTextEntMake ( TxIN Ang2 Tx cst / )
(setq lay (strcat lay "_txt"))
(entmake
(list
'(0 . "Text")
(cons 7 "OPA_DEPTH_TEXT")
(cons 40 0.35)
(cons 8 lay)
(cons 1 Tx)
(cons 10 TxIN)
(cons 50 ang2)
(cons 72 1)
(cons 73 2)
)
)
(command "chprop" "l" "" "a" "y" "")
)
The rest of the cons values are being generated elsewhere. but when I use this version, defining 72 and 73, the text is now drawing at 0,0,0 at 0 degrees instead of using the insertion point and orientation it should. It seemed like a no brainer to alter the cons list values to achieve what I wanted, obviously not.