CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > CoCreate Drafting

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 21 votes, 4.90 average. Display Modes
  #1  
Old 10-09-2003, 11:14 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Inch vs mm units problems

Please use this thead to post tips about importing DXF files into Drafting/ME10 or Annotation.

Here is a tip I received from Eric Barton of Agilent some time ago.

If you import DXF file in and the size is scaled up or down by a factor 25.4, this is the result of a Metric-English conversion problem. AutoCAD has no internal notion of units (mm vs. inch vs. feet vs. miles vs. light years) but it does keep track of English vs. Metric systems. This controlled by an environment variable on the PC running AutoCAD.

If the wrong setting was used, it can be fixed by a simple edit to the DXF file. DXF files are plain text, so they are easy to edit. To change the variable:
  1. Open the .dxf file in a text editor (NotePad or WordPad will work.)
  2. Search for the string $MEASUREMENT. You should find a section that looks like this:
    Code:
     
    $MEASUREMENT
     70
         X
      0
  3. If the X is a 0, then it will import as English (inches in CoCreate apps). If the X is a 1, then it will import as Metric (mm in CoCreate apps). Note that the 4th line may be a different number.
  4. Change the X to the other value.
  5. Save the file using File, Save. If you use Save As... to rename the file, enclose the file name in double quotes ("filename.dxf"), otherwise a .txt extension will automatically be added to the name.
__________________
John Scheffel
Reply With Quote
  #2  
Old 10-09-2003, 11:15 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Importing DXF files with units other than inch or mm

This information came from CoCreate support in response to a question about importing a DXF file which was intended to be drawn in microns (not created by AutoCAD). In order to change the settings as described below, you must edit the dxfdwg.con file which is located under the <install_dir>\dxfdwg\ folder. <install_dir> is the main application folder such as C:\CoCreate\OSD_Drafting_xx.xx or C:\CoCreate\OSD_Modeling_x.x.x.x.

CustomUnits
This switch controls the handling of drawing units in the translation.
  • When set to OFF (the default), the drawing units will be based on AutoCAD MEASUREMENT variable in the DXF file (see above): 0 for inches and 1 for millimeters.
  • When set to ON, the drawing units will be set based on the values of Units and UnitsScale parameters.
Units and UnitsScale
The Units parameter specifies the units used in the DXF to MI translation, and UnitsScale the scale of the units used. The following table shows the relationship between these two parameters:
Code:
             Units      Units scale  
micrometer   um         0.001  
millimeter   mm         1.0  
centimeter   cm         10.0  
meter        m          1000.0  
kilometer    km         1000000.0  
microinch    uinch      0.0000254  
mil          mil        0.0254  
inch         in         25.4  
foot         foot       304.8  
yard         yard       914.4  
mile         mile       1609344.0  
user unit    user unit  See below
In the case of user unit (meaning user-defined units), the corresponding Units scale factor must be calculated. If, for example, the user unit has been defined as 2 inches, the Units scale s 2x25.4 = 50.8. The factor 2 comes from 2 inches, and the factor 25.4 stems from the Units scale for inch in the above table.

The default settings are mm and 1.0 for Units and UnitsScale, respectively.
__________________
John Scheffel
Reply With Quote
  #3  
Old 05-02-2013, 10:22 AM
Lisa Lisa is offline
Registered User
 
Join Date: Aug 2012
Location: Colorado
Posts: 7
Re: Inch vs mm units problems

Quote:
Originally Posted by John Scheffel View Post
Please use this thead to post tips about importing DXF files into Drafting/ME10 or Annotation.

Here is a tip I received from Eric Barton of Agilent some time ago.

If you import DXF file in and the size is scaled up or down by a factor 25.4, this is the result of a Metric-English conversion problem. AutoCAD has no internal notion of units (mm vs. inch vs. feet vs. miles vs. light years) but it does keep track of English vs. Metric systems. This controlled by an environment variable on the PC running AutoCAD.



If the wrong setting was used, it can be fixed by a simple edit to the DXF file. DXF files are plain text, so they are easy to edit. To change the variable:
  1. Open the .dxf file in a text editor (NotePad or WordPad will work.)
  2. Search for the string $MEASUREMENT. You should find a section that looks like this:
    Code:
     
    $MEASUREMENT
     70
         X
      0
  3. If the X is a 0, then it will import as English (inches in CoCreate apps). If the X is a 1, then it will import as Metric (mm in CoCreate apps). Note that the 4th line may be a different number.
  4. Change the X to the other value.
  5. Save the file using File, Save. If you use Save As... to rename the file, enclose the file name in double quotes ("filename.dxf"), otherwise a .txt extension will automatically be added to the name.
I am having this problem. When I open the AutoCAD file in CoCreate Drafting 17, it is 25.4 times too big since it was created in metric units in AutoCAD. I tried your "edit the .dxf" and changed the 0 to a 1, but then I cannot load the .dxf file: "not a valid .mi file."

I swear I could fix this in ME10 Ver 9 in the setup menu where I could set the units and scale, but I cannot find it anywhere in CoCreate 17. Am I crazy?

When I modify > scale the part down by 25.4, of course the dimensions do not change scale and they end up too big.

Is there anything I can do to fix the scale and get the dimensions to scale with the part?

Thank you.
Reply With Quote
  #4  
Old 05-06-2013, 02:45 AM
Friedly's Avatar
Friedly Friedly is offline
Registered User
 
Join Date: May 2012
Location: Belgium
Posts: 76
Re: Inch vs mm units problems

Hello
Have a look in the file
C:\Path to aplication\dxfdwg\DXFDWG.con
and switch the
CustomUnits OFF
to
CustomUnits ON
and try again.
Further info in the readme.htm at the same folder.
Reply With Quote
  #5  
Old 05-08-2013, 12:44 PM
Lisa Lisa is offline
Registered User
 
Join Date: Aug 2012
Location: Colorado
Posts: 7
Re: Inch vs mm units problems

That worked beautifully! Thank you!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:53 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
You Rated this Thread: