Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi all,
I am trying to create a "Seed and Boundary" surface collection using creo toolkit.
I have various APIs such as ProSurfacesCollect(), ProSrfcollectionAlloc() etc.
Can anyone help me out using a code snippet?
I am attaching the code I have written to create the same.
ProError usercollectsurfaces()
{
ProError status = PRO_TK_GENERAL_ERROR;
ProMessageDisplay(PT_MSGFIL, (char*)"CTT Select Surface");
ProCollection collection;
status = ProSrfcollectionAlloc(&collection);
ProCollectioninstrType types[] = {PRO_SURFCOLL_SEED_N_BND };
ProSelection* coll_sels;
int coll_sels_size;
status = ProSurfacesCollect(types, 0, (ProCollFilter )NULL, (ProAppData )NULL, collection, &coll_sels, &coll_sels_size);
ProMessageClear();
ProSelection* regen_sels;
int n_regen_sels;
ProSrfcollectionRegenerate(collection, ®en_sels, &n_regen_sels);
status = ProCollectionFree(&collection);
status = ProSelectionarrayFree(regen_sels);
status = ProSelectionarrayFree(coll_sels);
return status;
}
Do I have to use some Buffer here? if yes, which one? Will this API be required?