Hello,
inside J-Link I've been trying to set a specific coordinate system for IGES export without success. Following code is taken from the J-Link examples (blue code is added by me):
ExportInstructions instrs;
GeometryFlags flags = pfcExport.GeometryFlags_Create();
flags.SetAsSolids(true);
IGES3DNewExportInstructions igesInstrs = pfcExport.IGES3DNewExportInstructions_Create(AssemblyConfiguration.EXPORT_ASM_SINGLE_FILE, flags);
igesInstrs.SetReferenceSystem();
Features csystems = ((Solid) model).ListFeaturesByType(Boolean.FALSE, FeatureType.FEATTYPE_COORD_SYS);
Feature secondCsys = csystems.get(1);
igesInstrs.SetReferenceSystem(pfcSelect.CreateModelItemSelection(secondCsys, null));
instrs = igesInstrs;
String outputPath = model.GetInstanceName().toLowerCase() + ".igs";
model.Export(outputPath, instrs);
Even though I specify the second coordinate system inside the IGES3DNewExportInstructions instance (no errors, debugging shows coordinate system) the IGES export has the first coordinate system.
I appreciate any idea and help.
Thank you and kind regards
Michael
Solved! Go to Solution.
Hi,
I did not test it yet but I think I have found the solution:
"The selection passed to Export3DInstructions.SetReferenceSystem() must reference the CSYS geometry and not the CSYS feature." (see How to select a CSYS when exporting to STEP with Creo OTK Java / Jlink)
Kind regards
Michael
Hi,
I did not test it yet but I think I have found the solution:
"The selection passed to Export3DInstructions.SetReferenceSystem() must reference the CSYS geometry and not the CSYS feature." (see How to select a CSYS when exporting to STEP with Creo OTK Java / Jlink)
Kind regards
Michael
Great solution, had the same issue but now using CSYS geometry reference it works like a charm.
Thank you @MichelH