Hi Kent,
One thing they did ask for, and I added, was the ability to change the angle of the text such that it can go to 90° and back to 0°.
The only caveat to this is to get back to 0, you have to go back around to 360°...
But I thought I'd share with you and anyone else that needs it.
[CODE]
(defun C:TAGGING (/ Tag_GenString Tag_PrintVals oecho OldOSM ds th txt InsPt NumbStr)
(defun Tag_GenString ()
(setq NumbStr (itoa Tag_Numb))
(if Tag_PadTo
(while (< (strlen NumbStr) Tag_PadTo)
(setq NumbStr (strcat "0" NumbStr))
);While
);if PadTo
;build our string
(setq NumbStr
(cond
((and Tag_Pref Tag_Suff) (strcat Tag_Pref NumbStr Tag_Suff))
(Tag_Pref (strcat Tag_Pref NumbStr))
(Tag_Suff (strcat NumbStr Tag_Suff))
(T NumbStr)
);cond
);setq
NumbStr
);Tag_GenString
(defun Tag_PrintVals ()
(princ "\nCurrent Value: ") (princ (strcat "\"" (Tag_GenString) "\""))
(princ "\nPrefix = ") (princ Tag_Pref)
(princ "\tNumber = ") (princ Tag_Numb)
(princ "\tIncrement = ") (princ TAGGINGr)
(princ "\tPadding = ") (princ Tag_PadTo)
(princ "\tSuffix = ") (princ Tag_Suff)
(princ "\n")
);Tag_PrintVals
;set Acad variables
(setq oecho (getvar "cmdecho")
OldOSM (getvar "osmode")
)
(if (= 0 (getvar "dimscale"))(setq ds 1.0)(setq ds (getvar "dimscale")))
(setq th (getvar "dimtxt"))
(setq txt (* th ds))
(setvar "cmdecho" 0)
(setvar "osmode" 0)
;set defaults and/or ensure existence of required variables in the drawing session
;since these will be global variables help ensure they are specific to this function
;by adding the function name to them to help ensure that some other function
;doesn't use the same variables and set unusable values to them
(if (not Tag_Numb) (setq Tag_Numb 1))
(if (not TAGGINGr) (setq TAGGINGr 1))
(Tag_PrintVals)
(while (not (setq InsPt (getpoint (strcat
"\nPick Insertion point or \<Enter\> to change Current value: \("
(Tag_GenString) "\) : "
))))
(setq ModVal T)
(while ModVal
(Tag_PrintVals)
(initget "Prefix Number Increment Angle padTo Suffix eXit")
(setq ModVal (getkword "Value to Change: \[Prefix\/Number\/Increment\/Angle\/padTo\/Suffix\/eXit\] \<eXit\>: "))
(cond
((or (= ModVal "") (= ModVal "eXit")) (setq ModVal nil))
((= ModVal "Prefix") (setq Tag_Pref (getstring T "Enter New Prefix Value: \<Enter\> for none: ")))
((= ModVal "Number")
(progn
(initget 1)
(setq Tag_Numb (getint (strcat "Enter Starting Number: ")))
));Number cond
((= ModVal "Increment")
(progn
(initget 3)
(setq TAGGINGr (getint (strcat "Enter Increment Value: ")))
))
((= ModVal "Angle")
(progn
(initget 50)
(setq Text_Angle (getint (strcat "Enter Tagging Angle: ")))
));Increment Cond
((= ModVal "padTo")
(progn
(setq Tag_PadTo (getint (strcat "Enter desired length of number string: ")))
(if Tag_PadTo (if (< Tag_PadTo 2) (setq Tag_PadTo nil)))
));PadTo cond
((= ModVal "Suffix") (setq Tag_Suff (getstring T "Enter New Suffix Value: \<Enter\> for none: ")))
);cond stmt
);while ModVal option
);while not InsPt
(while InsPt
(Tag_GenString)
;create the text entity
(entmake (list (cons 0 "TEXT")
(cons 10 InsPt)
(cons 11 InsPt)
(cons 1 NumbStr) ; actual text
(cons 50 (rtd Text_Angle))
(cons 7 (getvar "TEXTSTYLE"))
(cons 40 txt)
(cons 72 4)
)
);entmake
(setq InsPt (getpoint
(strcat
"\nNext number location \[use shift key to repeat " "\'"
NumbStr "\"\]")))
(if (not (acet-sys-shift-down))
(setq Tag_Numb (+ TAGGINGr Tag_Numb))
);if
);while
;reset our variables
(setvar "cmdecho" oecho)
(setvar "osmode" OldOSM)
(princ)
);defun C:Tag
(princ "\n Type > TAGGING < to insert text with Incrementing numbers.")
(defun rtd (n)
(* pi (/ n 180.0))
)
[/CODE]