How to SetReferenceSystem on model.Export
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
