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

Exporting STEP, Specifying a reference csys non interactively

SOLVED
msteffke
12-Amethyst

Exporting STEP, Specifying a reference csys non interactively

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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!

View solution in original post

3 REPLIES 3

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

President & Founder
CadActive Technologies - www.cadactive.com

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!

View solution in original post

This does get me what I want.   Onto the next barrier!  Thank You!~

Announcements