I would like to create an utility for restructuring parts. the utility should simple allow selection of several parts
and move it to new/existing sub assembly.
While searching through the misc documentation i couldn't find any information about it.
Does any of you have an experience with the following ? any ideas ?
Indeed we have restructure in Creo.
However, like always in customization, this is only part of the story...
the utility i'm thinking of should select all the relevant item automatically, according to certain logic, create new
asm, add all selected items to it, create a drawing out of it etc.
So as you can understand the question is not really how to preform the restructure through the GUI.
it should be fully automated.
The application is entirely possible - all relevant API's are available. The most difficult portion is going to be redefining component references due to the changes in ProAsmcomppath in the restructured assembly. The rest of code will revolve around ProSolidFeatVisit with filter set to ProType - PRO_FEAT_COMPONENT and ProElem API as in ProAsmcomp.h header file.
Can you tell me the way you did restructer ?
Did you use ProAsmcompAssemble function and then redefine all the references to it or there is other function to restructure ?
You could use ProAsmcompAssemble(...) with ProAsmcomConstraintsGet(...) and ProAsmcompConstraintsSet(...). My personal preference is to use ProElem related API's to manipulate ProElement tree of a feature (component).