Change the value of -DWGUNITS without command

Change the value of -DWGUNITS without command

FELIXJMELO
Contributor Contributor
536 Views
6 Replies
Message 1 of 7

Change the value of -DWGUNITS without command

FELIXJMELO
Contributor
Contributor

Change the value of -DWGUNITS without command?

0 Likes
537 Views
6 Replies
Replies (6)
Message 2 of 7

paullimapa
Mentor
Mentor

Don’t think there’s another option other than the command


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 7

TomBeauford
Advisor
Advisor

You can change unit values by modifying the system variables for each value in acaddoc.lsp.

(if (/= (getvar 'angbase) 0)(progn(setvar 'angbase 0)(princ "\nSet base angle to 0 (East). ANGBASE")))
(if (/= (getvar 'angdir) 0)(progn(setvar 'angdir 0)(princ "\nSet angle direction to counterclockwise. ANGDIR")))
(if (/= (getvar 'aunits) 4)(progn(setvar 'aunits 4)(princ "\nSurvey units. AUNITS")))
(if (/= (getvar 'auprec) 3)(progn(setvar 'auprec 3)(princ "\nSet angle precision to ddd°-mm'-ss\". AUPREC")))

 

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 4 of 7

ec-cad
Collaborator
Collaborator

At Command Prompt, type in UNITS<enter>

You can set the dwgunits there.

OR

You can use the Command "_-dwgunits" ... in your acaddoc.lsp file (if not found, make one with Notepad),

and put this in there:  (command "_-dwgunits" "3" "2" "4" "Yes" "Yes")(graphscr)

You will want to review the 3, 2, 4 settings.

 

I tried it at the command prompt, it does the job.

 

ECCAD

0 Likes
Message 5 of 7

Sea-Haven
Mentor
Mentor

SeaHaven_0-1716073228742.png

SeaHaven_1-1716073255339.png

 

 

 

Message 6 of 7

ec-cad
Collaborator
Collaborator

THx.

I edited the previous posting.

ECCAD

0 Likes
Message 7 of 7

MICROCADDAER6
Explorer
Explorer

If you change -DWGUNITS from 3 to 6, AutoCAD displays the message below and asks the user for confirmations, which in a professional program is not very elegant.

 

 

** WARNING: you have changed the unit for this drawing database. **
** All new objects will be drawn according to the new unit, but **
** existing objects will not change size unless you specifically **
** ask to have automatic scaling occur. **
nil

Scale objects in current drawing to reflect change in units? [Yes/No] <Yes>:

Include objects in Paper Space? [Yes/No] <Yes>:

0 Likes