Skip to main content
1-Visitor
October 16, 2017
Solved

Dxf Version in Jlink

  • October 16, 2017
  • 3 replies
  • 2295 views

I need to Export the drawing file to dxf format usinh Jlink .

 

Creo provides an option to export an drawing file to dxf is as follows,

 DXFExportInstructions dxfexportInstructions = pfcModel.DXFExportInstructions_Create();
draw.Export(draw.GetFullName(), dxfexportInstructions);

It works fine ,It will convert the drawing to DXF in a lowest version 2007 ,but i want to change the dxf Settings using Jlink.please guide me to solve this.

 

Best answer by RandyJones

@ddhini wrote:

Thanks, We cant set the DXF version through Jlink. Instead we can set through the Config file ,


Jlink allows you to get and set config options:

String originalValue = session.GetConfigOption("dxf_export_format");//original version

session.SetConfigOption("dxf_export_format", "2013");//desired value

//do something...

session.SetConfigOption("dxf_export_format", originalValue);//reset to original value

 

3 replies

20-Turquoise
October 16, 2017

@ddhini wrote:

I need to Export the drawing file to dxf format usinh Jlink .

 

Creo provides an option to export an drawing file to dxf is as follows,

 DXFExportInstructions dxfexportInstructions = pfcModel.DXFExportInstructions_Create();
draw.Export(draw.GetFullName(), dxfexportInstructions);

It works fine ,It will convert the drawing to DXF in a lowest version 2007 ,but i want to change the dxf Settings using Jlink.please guide me to solve this.

 


Take a look at the config.pro option dxf_export_format. I don't know for sure if this controls the version when exported from jlink however I suspect it does. This option can be set from jlink if needed.

ddhini1-VisitorAuthor
1-Visitor
October 19, 2017

Thanks, We cant set the DXF version through Jlink. Instead we can set through the Config file ,

20-Turquoise
October 19, 2017

@ddhini wrote:

Thanks, We cant set the DXF version through Jlink. Instead we can set through the Config file ,


Jlink allows you to get and set config options:

String originalValue = session.GetConfigOption("dxf_export_format");//original version

session.SetConfigOption("dxf_export_format", "2013");//desired value

//do something...

session.SetConfigOption("dxf_export_format", originalValue);//reset to original value