cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Dxf Version in Jlink

ddhini
14-Alexandrite

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyJones
19-Tanzanite
(To:ddhini)


@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

 

View solution in original post

3 REPLIES 3
RandyJones
19-Tanzanite
(To:ddhini)


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

ddhini
14-Alexandrite
(To:RandyJones)

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

RandyJones
19-Tanzanite
(To:ddhini)


@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

 

Top Tags