How to Find Metric or English ?

 

How to check the Unit of an active Draft Document ? ( METRIC or ENGLISH )

I mean how to get  value of Length Readout Unit  whether it is Meter / mm / inch / foot.

 

Posted by: KALPESH PARMAR
Post date: 2/14/2008 1:58:37 PM

3 REPLIES

RE: How to Find Metric or English ?

I know how to do it in other environments but it seems Draft is a little different. I'm yet to find a solution for you but I'll keep looking.

 

Posted by: Jason Newell
Post date: 2/15/2008 6:32:37 AM

RE: How to Find Metric or English ?

 

I am coding in C++.

Will this work ?

 

UnitsOfMeasurePtr pUOM = pDrfDoc->GetUnitsOfMeasure();

 

UnitOfMeasurePtr pUnit = pUOM->Item("????????" );    //  What to put in here... I tried Length, Distance ... not working

 

int i = pUnit->GetUnits();

 

Posted by: KALPESH PARMAR
Post date: 2/15/2008 6:37:53 AM

RE: How to Find Metric or English ?

 

The following works for me (VB6 - SE 20)

lenUnitType = Replace(dftDoc.UnitsOfMeasure.FormatUnit(1, 0#, 0), "0 ", "")

 

Posted by: Sanjay Kulkarni
Post date: 9/24/2010 10:06:02 PM