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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Copying and renaming a manufacturing assembly

cvansickle
7-Bedrock

Copying and renaming a manufacturing assembly

I have need to copy and rename a manufacturing assembly, with all of it's components, but I am struggling to figure out how to do this while maintaining all of the assembly references. Basically, I am looking for the equivalent ofFile->"Save a Copy". When you save a copy of a manufactuing assembly, pro prompts you to rename the assembly, and then each component.I am working with the VB API in wildfire 4, and I would rather not call a macro or a toolkit dll. Could anyone be of assistance here?


Thanks in advance,


Corey


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
2 REPLIES 2
FV
17-Peridot
17-Peridot
(To:cvansickle)

Hi all,


Corey,


Copying and renaming manufacturing assembly process is verysimilar to amanual one...


The most simplistic case - no models in session


- create temporary directory


- change working directory to where an assembly tobe processedis located


- set config optionsrelated toretrieval of merged and referenced geometry to retrieve...


- retrieve an assembly in question into session


- change working directory to temporary directory


- backup models to temporary directory


- erase all models from session


- retrieve the assembly from the temporary directory


- rename models in session


- backup to the specified directory


- remove temporary directory.


HIH.


Feliks.

In Reply to Corey Van Sickle:



I have need to copy and rename a manufacturing assembly, with all of it's components, but I am struggling to figure out how to do this while maintaining all of the assembly references. Basically, I am looking for the equivalent ofFile->"Save a Copy". When you save a copy of a manufactuing assembly, pro prompts you to rename the assembly, and then each component.I am working with the VB API in wildfire 4, and I would rather not call a macro or a toolkit dll. Could anyone be of assistance here?


Thanks in advance,


Corey


Thanks for the reply.

I also got the following to work:

- Use VB to copy all the files in a manufacturing assembly to the directory of choice (the working directory in this situation)

- Using the API to rename and save each file after retrieving it into memory, ending with the .asm (IpfcAssembly) and finally the .mfg (IpfcMFG).

- Use VB to delete the copies that still retain the old name, as the rename method simply made a copy with a new name.

- Run the purge.bat file to remove redundant versions of the files.

- Use VB to change the revision extension for each file to 1

This prevents me from having exceptions for paths to files/directories being too long, without having to temporarily map a network drive or change working directories.
Announcements


Top Tags