Here's a quick solution. There is no to very little error checking. It does not adjust any system variables. It utilizes the current text style, text size. If the current style does not have a height specified, it will see what the TEXTSIZE system variable has. If that equals 0.0 then it asks the user for the text size. All variables are local.
Code:
(defun c:NE-CLC (/ ACTUALPOINT CALCPOINT
DIFFERENCEEASTING DIFFERENCENORTHING
STREASTING STRLIST STRNORTHING
TEXT TEXTPLACEMENT TEXTSIZE
)
(setq CalcPoint (getpoint "\nSpecify Calculated Point: ")
ActualPoint (getpoint "\nSpecify Actual Point: ")
)
(setq DifferenceNorthing (- (car CalcPoint) (car ActualPoint))
DifferenceEasting (- (cadr CalcPoint) (cadr ActualPoint))
)
(list DifferenceNorthing DifferenceEasting)
(if (minusp DifferenceNorthing)
(setq strNorthing "'N")
(setq strNorthing "'S")
)
(if (minusp DifferenceEasting)
(setq strEasting "'E")
(setq strEasting "'W")
)
(setq strNorthing (strcat
(rtos (abs DifferenceNorthing) 2 (getvar "luprec"))
strNorthing
)
strEasting (strcat (rtos (abs DifferenceEasting) 2 (getvar "luprec"))
strEasting
)
)
(setq strList (list strNorthing strEasting))
(setq TextPlacement
(getpoint
"\nSpecify text insertion or <Enter> to exit: "
)
)
(if (= (type TextPlacement) 'LIST)
(progn
(if
(or (null textsize)
(= (cadr (assoc 40 (tblsearch "STYLE" (getvar "TEXTSTYLE"))))
0.0
)
)
(if (= (getvar "TEXTSIZE") 0.0)
(while
(null (setq textsize (getreal "\nSpecify Text Height: ")))
)
(setq textsize (getvar "TEXTSIZE"))
)
(setq textsize
(cadr (assoc 40 (tblsearch "STYLE" (getvar "TEXTSTYLE")))
)
)
)
(foreach n strList
(progn
(setq TEXT (list (cons 0 "TEXT")
(cons 7 (getvar "TEXTSTYLE"))
(cons 8 (getvar "CLAYER"))
(cons 10 TextPlacement)
(cons 11 TextPlacement)
(cons 40 textsize)
(cons 72 0)
(cons 1 N)
(cons 50 0.0)
(cons 51 0.0)
)
)
(entmake TEXT)
(setq TextPlacement
(polar TextPlacement
4.71239
(* 0.3428571428571425 (/ textsize 0.20))
)
)
)
)
)
)
)
Post back any problems.