Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello!
I have to copy an assembly with components which are instances of familiy table.
In the Proe-GUI the user can call "Save a copy" and select the action "New Name",
so the component isn't a family table instance.
How do I have to do that per Pro/TOOLKIT???
Thanks, Lars
Hello!
Thanks for your answer, Patrick.
I think, I know theese functions well.
It's no problem to copy the assembly to a new name.
The new assembly contains a part which is an instance of a family table.
Does anybody know, how to separate the component from the family table?
Thanks, Lars
Hi all,
Lars,
I think the problem you are dealing with is how to determine if a model in session is an instance of family table.ProMdlDataGet would show '<' and '>' in the 'name' ProMdldata structure member for a family instance...
So, the program flow for interactive selection of family instancesshould be something like this:
-Retreive an assembly with an appropriate family instance
-get a list of model in session
-get ProMdldata for each model
-wcschr for '<' in mdldata.name
-ProMdlRename if success
-backup an assembly
HIH.
FV.
In Reply to Lars Ziegler:
Hello!
Thanks for your answer, Patrick.
I think, I know theese functions well.
It's no problem to copy the assembly to a new name.
The new assembly contains a part which is an instance of a family table.
Does anybody know, how to separate the component from the family table?
Thanks, Lars
Hello Feliks!
Thanks for you answer.
I know that the used component is an instance!
If you copy an assembly with the ProE-userinterface,
you can select "new name" for the component.
With "new name" the new component is a generic model.
I think, in your solution the MdlRename will rename the instance name,
and with MdlBackup you will save the generic model. So we didn't copy the instance
to a normal part.
Greetings Lars
Hello!
After theese threads I think the normal way is to delete the instance in the famtable
or what i have done:
- delete the whole famtable with ProFamtableErase() and do not save the origin generic model
- Rename the Model and save it
Thanks for the discussion!
Greetings Lars