Skip to main content
Oct 16, 2017 9:52 AM UTC
Solved

Dxf Version in Jlink

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.

 

Oct 19, 2017 1:32 PM UTC

@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

Oct 16, 2017 1:19 PM UTC

@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.

ddhiniAuthor
Oct 19, 2017 3:54 AM UTC

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

Oct 19, 2017 1:32 PM UTC

@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