- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have got the following lisp to display area inside the box. But the text is in 0°. Can somebody help me to modify the lisp to display text in various angles. i.e 90°, 180°, 270° ?
(vl-load-com)
(defun c:TXTAREA (/ area ent flag lst obj pt tmpH)
(if (or (not *Hscl*) (/= (type *Hscl*) 'REAL))
(setq *Hscl* (getvar 'TEXTSIZE))
)
(initget 6)
(setq tmpH (getreal (strcat "\nSpecify Text Height: <" (rtos *Hscl*) ">: ")))
(if (/= tmpH nil)
(setq *Hscl* tmpH)
)
(while (null flag)
(cond ((setq pt (getpoint "\nSpecify internal point <exit>: "))
(if (and (setq lst (entlast))
(vl-cmdf "_.-boundary" pt "")
(setq ent (entlast))
(not (eq lst ent))
)
(progn
(setq obj (vlax-ename->vla-object ent)
area (vla-get-area obj)
)
(entmake (list
'(0 . "TEXT")
(cons 10 (trans pt 1 0))
(cons 40 *Hscl*)
(cons 1 (strcat (rtos area 2 2) " m2"))
(cons 50 (angle '(0.0 0.0) (getvar 'UCSXDIR)))
)
)
)
)
)
(T
(setq flag T)
)
)
)
(princ)
)
Solved! Go to Solution.