Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
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!
Solved! Go to Solution.
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!
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
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!
This does get me what I want. Onto the next barrier! Thank You!~