Skip to main content
15-Moonstone
June 5, 2020
Solved

Exporting STEP, Specifying a reference csys non interactively

  • June 5, 2020
  • 1 reply
  • 2031 views

My program involves automated configuration of assemblies.  I am exporting the results as STEP files using ProIntf3DFileWrite.   The 5th argument is reference Csys,  a ProSlection, This argument takes NULL for default csys, but I need a specific csys in my case for future assembly of the step file.    My program runs non-interactively, so there is no one selecting the csys.   I know the name of the Csys and have code where I am successfully finding and obtaining  the handle.    What I cannot seem to figure out is how to convert this csys handle to a Pro Selection.  Any ideas?   Thanks!

Best answer by msteffke

Yes I am converting to geomitem, but I was trying to use ProFeatureSelectionGet.   Not the right function for my situation.   I will try the ProSelectionAlloc that you suggest - fingers crossed!

1 reply

14-Alexandrite
June 5, 2020

when you "find" the Csys in your code, do you find it as a ProCsys?

 

If so, you will need to convert it to a ProGeomitem beforehand. 

 

Something like this: 

 

 

 ProMdl model; // Get this with your code, or with "ProMdlCurrentGet(&model)";
 ProCsys csys; // Get this with your code somehow

 ProGeomitem csys_geomitem;
 ProCsysToGeomitem((ProSolid)model, csys, &csys_geomitem);

 ProSelection sel_geomitem;
 ProSelectionAlloc(NULL, (ProModelitem*)&csys_geomitem, &sel_geomitem);

 

 

Hope this helps!

 

Thanks, 

James Sullivan

msteffke15-MoonstoneAuthorAnswer
15-Moonstone
June 5, 2020

Yes I am converting to geomitem, but I was trying to use ProFeatureSelectionGet.   Not the right function for my situation.   I will try the ProSelectionAlloc that you suggest - fingers crossed!