Author Topic: Is this .dwg metric?  (Read 2125 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Is this .dwg metric?
« on: December 05, 2007, 12:21:10 PM »
How to find out if your drawing is in metric units using autolisp?
TheSwamp.org  (serving the CAD community since 2003)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Is this .dwg metric?
« Reply #1 on: December 05, 2007, 12:23:56 PM »
Measurement system variable.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Bryco

  • Water Moccasin
  • Posts: 1883
Re: Is this .dwg metric?
« Reply #2 on: December 05, 2007, 01:59:56 PM »
I use "insunits 4 "  4,5 & 6
While measurement should work it is about hatch

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Is this .dwg metric?
« Reply #3 on: December 05, 2007, 02:16:49 PM »
I use "insunits 4 "  4,5 & 6
While measurement should work it is about hatch
I thought measurement was about anything stock that had two files, one for empirical and one for metric.  Like linetyles, so it knows which file to grab the info from.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Bryco

  • Water Moccasin
  • Posts: 1883
Re: Is this .dwg metric?
« Reply #4 on: December 06, 2007, 01:28:45 AM »
I think you should be right, it's just that I had to mess with a whole job that had metric templates that didn't use iso linetypes and metric hatch settings. Bloody hassle.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Is this .dwg metric?
« Reply #5 on: December 06, 2007, 01:49:06 AM »
How to find out if your drawing is in metric units using autolisp?


Just to show that we can read questions ;

Code: [Select]
(IF (= 1 (GETVAR "MEASUREMENT"))
    (ALERT "Metric Drawing")
    (ALERT "English Imperial Drawing")
)

Quote
System Variable MEASUREMENT
Sets drawing units as English or metric for the current drawing only. Specifically, MEASUREMENT controls which hatch pattern and linetype files an existing drawing uses when it is opened.

0   English; AutoCAD uses the hatch pattern file and linetype file designated by the ANSIHatch and ANSILinetype registry settings.
1   Metric; AutoCAD uses the hatch pattern file and linetype file designated by the ISOHatch and ISOLinetype registry settings.

The drawing units for new drawings are controlled by MEASUREINIT (MEASUREINIT uses the same values as MEASUREMENT). The MEASUREMENT setting of a drawing always overrides the MEASUREINIT setting.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.