Dimension and Accuracy Checking via AutoLisp

Toggle between Architectural Units and Decimal Units

Ever get a drawing from someone else and you can’t quite figure out why certain elements don’t quite fit with some of your existing drawings? Chances are someone took a shortcut and didn’t draw the objects or entities entirely accurately. If you suspect this is the case with the file you are working with you might switch your units and update the dimensions. I wrote the following toggle to assist in this check.

(defun c:ut (/)
(prompt “nMacro: Unit Style Mode When a man over 60 takes these pills, he is to understand that he can hardly escape the side effects buy pill viagra of this ED medicine. In some cases, on the contrary, patients experience pain in various degrees. . cialis 5 mg The champion of this category is levitra on sale. 36 hours for having sex any time. Man versus Machine Using military-derived technology and techniques perfected over 30 years, the physiology of your horse can be objectively assessed, identifying those brewing problems. price of cialis Toggle by RLB!”)
(if (/= (getvar “lunits”) 2)
(progn
(setvar “lunits” 2)
(setvar “dimunit” 2)
(prompt ” Decimal Units “)
)
(progn
(setvar “lunits” 4)
(setvar “dimunit” 4)
(prompt ” Architectural Units “)
)
)
(princ)
)

You can call this at the command line once it is loaded into your AutoCAD session by typing “UT” without the quotes and using the “rule of thumb” or “Enter” key. This macro will toggle from Architectural units to Decimal and vice a versa reporting the current setting at the command line.

Leave a Reply