Looking for a way to turn off the dialog box when using UNITS in AutoLisp

Looking for a way to turn off the dialog box when using UNITS in AutoLisp

WeberThompson
Enthusiast Enthusiast
869 Views
4 Replies
Message 1 of 5

Looking for a way to turn off the dialog box when using UNITS in AutoLisp

WeberThompson
Enthusiast
Enthusiast

I have tried -UNITS, 'UNITS, ._UNITS, turning CMDDIA to 0.

None of these turn off the UNITS dialog box.

Please help.

0 Likes
Accepted solutions (1)
870 Views
4 Replies
Replies (4)
Message 2 of 5

Shneuph
Collaborator
Collaborator

Can I ask why you're using the "Units" command? What are you trying to accomplish?  User input involved?

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
0 Likes
Message 3 of 5

CodeDing
Advisor
Advisor

@WeberThompson,

 

I may be mistaken, but it sounds like you have the right idea but wrong approach. Try:

(getvar "INSUNITS") ;returns current units

(setvar "INSUNITS" 1) ;sets current units

and

(getvar "LUPREC") ;returns current precision

(setvar "LUPREC" 2) ;sets current precision

 

..all of the items in the UNITS menu should be stored as system variables that will be changed. That is how you  "get rid of" the menu option.

 

Best,

~DD

Message 4 of 5

scot-65
Advisor
Advisor
AUNITS
AUPREC
LUNITS
LUPREC
there are others...

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 5 of 5

WeberThompson
Enthusiast
Enthusiast
Accepted solution

Thanks everyone.  I finally figured it out by using GRAPHSCR at the end of my LISP routine.

0 Likes