TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: pedroantonio on March 15, 2019, 05:54:54 AM

Title: CHANGE DRAWING UNITS LISP
Post by: pedroantonio on March 15, 2019, 05:54:54 AM
hi. I am using a lot of drawings and all the tine  i need to check the drawing units because there  are wrong. For example we are working in meters  bun in the setting is feet or inches , and if i insert a block or xref i have probles with the scales. So i want a lisp to change the drawing setting to this

Thanks
Title: Re: CHANGE DRAWING UNITS LISP
Post by: Dlanor on March 15, 2019, 07:23:55 AM
System variables that control drawing units :

AUNITS - controls angular units.  Set to 2 for grads

AUPREC - Angular unit precision. Set to 4

ANGDIR - Angle direction.  Set to 1 for clockwise

ANGBASE - Sets the base angle to 0 with respect to the current UCS. For North this will be (/ pi 2)

LUNITS - controls Length units. Set to 2 for decimal

LUPREC - Length precision. Set to 3

INSUNITS - Specifies a drawing-units value for automatic scaling of blocks, images, or xrefs inserted or attached to a drawing. Set to 6 for metres.


(mapcar 'setvar (list 'aunits 'auprec 'angdir 'angbase 'lunits 'luprec 'insunits) (list 2 4 1 (/ pi 2) 2 3 6)) 
Title: Re: CHANGE DRAWING UNITS LISP
Post by: pedroantonio on March 15, 2019, 08:11:05 AM
Thank you Dlanor
Title: Re: CHANGE DRAWING UNITS LISP
Post by: MeasureUp on March 18, 2019, 11:53:57 PM
You may also consider these SV below:

HTH