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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Exporting STEP, Specifying a reference csys non interactively

msteffke
14-Alexandrite

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!

ACCEPTED SOLUTION

Accepted Solutions
msteffke
14-Alexandrite
(To:sully7)

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
sully7
14-Alexandrite
(To:msteffke)

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
msteffke
14-Alexandrite
(To:sully7)

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!

msteffke
14-Alexandrite
(To:sully7)

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

Announcements


Top Tags