Skip to main content
1-Visitor
September 14, 2015
Solved

Create DXF

  • September 14, 2015
  • 2 replies
  • 3863 views

Is there a way to create a 2D DXF of a part automatically?

We have a template with only 1 view with an orientation DXF. Now I would like to make a mapkey so automatically the drawing is created out of the part and also the drawing then is saved as DXF


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.
Best answer by MartinHanak

Danny,

I created an example for you, see x1.zip file.

  • x1.prt ... testing prt located in working directory
  • x1_template.drw ... testing template located in working directory
  • x1_mapkey.pro ... mapkey dxf

My testing procedure:

  • add the contents of x1_mapkey.pro into config.pro located in working directory
  • start Creo Parametric 2.0 M070
  • open x1.prt
  • run dxf mapkey
  • enter x1 when asked to Enter drawing name

If you want to automate entering of drawing name, then you have to use combination of AutoIt(AutoHotkey)+trail file+mapkey.

Martin Hanak

2 replies

1-Visitor
September 15, 2015

Hello,

Try this:

mapkey $F2 ~ Command `ProCmdModelNew` ;~ Select `new` `Type` 1 `Drawing`;\

mapkey(continued) ~ Activate `new` `OK`;~ Activate `dwg_create` `psh_ok`;\

mapkey(continued) ~ Close `main_dlg_cur` `appl_casc`;~ Command `ProCmdExportPreview`

mapkey(continued) ~ Command `ProCmdDwgPubSetDeliverable`  `DXF`;\

mapkey(continued) ~ Command `ProCmdDwgPubExport` ;~ Activate `file_saveas` `OK`;

24-Ruby III
September 15, 2015

Danny,

I created an example for you, see x1.zip file.

  • x1.prt ... testing prt located in working directory
  • x1_template.drw ... testing template located in working directory
  • x1_mapkey.pro ... mapkey dxf

My testing procedure:

  • add the contents of x1_mapkey.pro into config.pro located in working directory
  • start Creo Parametric 2.0 M070
  • open x1.prt
  • run dxf mapkey
  • enter x1 when asked to Enter drawing name

If you want to automate entering of drawing name, then you have to use combination of AutoIt(AutoHotkey)+trail file+mapkey.

Martin Hanak

1-Visitor
September 15, 2015

Hi, it does not work 100% automaticly, becouse you have to set DXF view in model before.

I mostly need to create DXF of sheetmetal parts. 'I have to set up dxf view before. It is nice there is "Flat Pattern Preview" but I can't save that view.

Does somebody know how to create DXF of sheetmetal part 100% automaticly by mapkey in creo2?

Thanks

12-Amethyst
September 16, 2015

Can you share a sample part and the template you pretend to use to give it a try?

Jose