Skip to main content
1-Visitor
January 13, 2016
Question

setting units on a dxf file

  • January 13, 2016
  • 2 replies
  • 14289 views

I am using "gear template generator" Gear template generator program to create a gear outline. I set the units to inches, diametral pitch to 12, number of teeth to 12. It draws a gear that is 1 inch in diameter. looks great.  I export it to a dxf file.

I then try to bring it into CREO using the instructions here: Create gears for 3D printing with PTC Creo Elements/Direct Modeling Express 6 and Gear Generator - YouTube

I select a workplane, select File->Open, in the popup, I select "File Type" to be "Import 2D to Workplane (...dxf...)". I then select the .dxf file.

No matter what I do, it always shows up as a 1mm diameter gear.

If I set the units in creo to be inches, the gear shows up as 0.04". If I set the units in creo to mm, the gear shows up as 1mm.

I have tried editing the file at C:\Program Files\PTC\Creo Elements\Direct Modeling Express 6.0\dxfdwg\DXFDWG.con, changing these two lines:

CustomUnits                   OFF

Units                         mm

I have tried CustomUnits ON and OFF. and I have tried Units mm and inch.

I have tried setting File->Settings->System->Length to inches and mm.

No matter what I do, I get a gear that is way too small.

How do I tell CREO what units the DXF file is?

Either that, or once I get the DXF into CREO as a 2D outline, is there a way to scale it?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

2 replies

17-Peridot
January 13, 2016

Hello,

the answer to the last question is easy. See image 1
The rest is not so simple.
Would you upload the DXF?
If you can not find the button for attachment of a file. picture 2

Scale.jpg

You have to use the advanced editor for the attachment of a file.

I used the German setting, but the buttons should be at the same place.

Anhaengen.jpg

1-Visitor
January 14, 2016

Have you contacted the author of the program? He's a hard working guy and would likely be interested if there is a problem.

The DXF file should have the scale built in. It's a text file you can open with notepad. You can see the header explained in http://www.autodesk.com/techpubs/autocad/acad2000/dxf/header_section_group_codes_dxf_02.htm

I see units mentioned several times so it may require a few separate changes.

glondon1-VisitorAuthor
1-Visitor
January 14, 2016

David Schenken: The DXF file should have the scale built in.

Hm. That's concerning. The help file for the gear generator here:

Gear template generator help

Specifically says:

Note, however, that on importing DXF, the units are not specified inside the file. Typically, one must indicate to the importing program what units are represented in the file.

It also says:

The DXF export does not include units.

I did edit the file with notepad. I didn't see anything with units.

[eta]

The wikipedia article about DXF format says: "DXF coordinates are always without dimensions so that the reader or user needs to know the drawing unit or has to extract it from the textual comments in the sheets."

If it is always without dimensions, I would think it would import the dxf assuming the units are the same as whatever is set in the CREO space, but it doesn't seem to do that.

Greg

1-Visitor
January 14, 2016

Hello Greg,

In the DXFDWG.con file you might want to try this as the settings:

Units                         inch

UnitsScale                    25.4

This should hopefully bring the drawing in at the right scale.

Regards,

Thom