I am having trouble make the text use current style... and i am having trouble adding a "X" to the begining of the line... can someone please help advise me.
thank you
(defun c:S2 ()
;; assumes 2 blocks available named "SpotLeft" and
;; "SpotRight" with different base points, a rectangle and
;; 2 attributes, text drawn at 1 unit high.
(setq TxtHt (getreal "\nText height for label: ")
Pt1 (getpoint"\nPick point for elevation: ")
Pt2 (getpoint Pt1 "nPick elevation label point: ")
)
(setq BkName (if (> (car Pt2) (car Pt1)) "SpotRight" "SpotLeft"))
(setq SpotElev (getreal "\nEnter elevation: ")
SpotHigh (+ 0.5 SpotElev)
SpotElevTxt (rtos SpotElev 2 2)
SpotHighTxt (rtos SpotHigh 2 2)
)
(command "line" pt1 pt2 "")
(command "-insert" BkName Pt2 TxtHt TxtHt 0 SpotElevTxt SpotHighTxt)
(princ)
)
(defun c:S1 ()
;; assumes 2 blocks available named "SpotLeft1" and
;; "SpotRight1" with different base points, a rectangle and
;; 1 attributes, text drawn at 1 unit high.
(setq TxtHt (getreal "\nText height for label: ")
Pt1 (getpoint"\nPick point for elevation: ")
Pt2 (getpoint Pt1 "nPick elevation label point: ")
)
(setq BkName (if (> (car Pt2) (car Pt1)) "SpotRight1" "SpotLeft1"))
(setq SpotElev (getreal "\nEnter elevation: ")
SpotElevTxt (rtos SpotElev 2 2)
)
(command "line" pt1 pt2 "")
(command "-insert" BkName Pt2 TxtHt TxtHt 0 SpotElevTxt SpotHighTxt)
(princ)
)