I have a configurator assembly with parts and drawings.
I have been trying to use design copy.. but i want to give the files a completely new name... not just a prefix or suffix
I will always copy the exact same files and the file name will be based off of user input.
egg. (Contract number-Order Line Number) and then incremental numbers.
I would preferer to name the files to copy rather then iterating through the assembly.. that way I have better control on what happens.
In my office I use Vault, but my client does not have and we do a lot of work without internet connections.
Any help would be appreciated.
I suppose you could iterate through each part in an assembly, save as (Contract number-Order Line Number), then replace the component. Do you have any derived relationships between parts though?
Hello
Is the incremental number also part of the original file names? So would a simple search and replace of the static part do the job? You could give this modified version of copy design a try.
Or do you need a editable list of all filenames? This a lot more complicated, cause you'll have to take care e.g. if a filename is changed, the name of the assembly containing an occurrence of that part needs a new name too.
Here is a screen shot of all the documents in the folder.... I want to be able to copy design all the documents in this folder. Replacing the (22-1334) with a specific contract number and the (ZTL01) with a specific order line number, by default it would be ((ZTL01 + 1) = ZTL02) the trailing (-12, -13) would stay the same.
Previously I have put together snips of code found here that will copy the part and the drawing... or the assembly and drawing... see txt files below
Hello
I assume all the parts are placed in the assembly? If so, you can try the attached copy design tool. After extract the zipfile:
- Start the copydesign.exe
- select the source assembly file
- select a target folder (i recommend an empty subfolder of the source folder)
- activate the "Replace" control
- fill "22-1334-ZTL01" in the textbox for the string to replace
- fill the new contract number and "ZTL02" in the textbox for the string to insert
- activate the "Include Drawings" control
- click OK and wait until the finished message appears.
I can not guarantee it's free of bugs, but maybe it fit your needs.
@Ralf_Krieg this is almost perfect.... I would need an option to not copy content center items... is this code available in iLogic... so I could adapt it into some other programs?
Hello
Sorry, being a bit busy last days.
The version attached ignores content center files as long as they are not inserted as user defined. They will not be copied, the references are not changed and points further to the original files. User defined CC files are copied. I think this is the correct and expected program behaviour.
I'm struggling a bit with iParts and iAssemblies. Until now, these files where handled same as CC files and not copied. This means, drawing files of iParts, iAssemblies and CC files will not be copied too.
The program is based on the CopyDesign code which is included in the SDK delivered with Inventor. You can get the source code there. The program uses apprentice server, so it is not possible to direct integrate this code in an iLogic rule.
Hi @Ralf_Krieg,
I tried to use the EXE file in the SDK from Inventor but it didn't work and it seems that it works only if a drawing file is created (I also tested after creating a .dwg file but it's still not working).
Your version is working fine and doesn't need to have a drawing file but I'm looking for something to create multiple copies with different names based on a list probably in an excel sheet.
I would be grateful if you can share your code or the part the code used to link new parts in the new assembly.
Thanks!
Hello
Sorry, seen your question but forgot to answer. You can use the source code of the copy design tool in the SDK. The method to create the copy is unchanged. I wrote only a modification around that to create multiple copies in a loop. The rest, like search and replace parts of the filename is useless, cause you'll use an excelfile to get the new filenames.
After removing the obsolete parts you'll have the original source code and a "for i=1 to number of copies" loop to run it multiple times.
Hello
It's right, Apprentice server can not migrate documents. And Apprentice has no graphical user interface and access to geometric informations, so you can't modify your model with it. The question was to create a copy of the assembly, all referenced files and replace all the references within. I would always migrate an assembly before copy. Any changes to the model could be done after copying. Or do you want to change your template assembly?
If you adapt the code to Inventor, you'll shortly recognize that there's no FileSaveAs object. This is Apprentice only, there is no equivalent in Inventor.
Hello
There's a boolean property "NeedsMigrating" in every document.
I think the most problematic thing is that you change one document reference and Inventor tries to recompute your assembly, recalculate dimensions, solve contraints and so on. This will most time result in a destroyed model. I think there's a reason why desgin assistant and any other tools who clones complete designs always use Apprentice.
Hello
Yes, this should be correct for linked files. If the 3rd party file is embedded, it will be automatic copied with the containing Inventor document and no extra handling is required.
Dear @Ralf_Krieg I wonder if 1.1.1 version is the latest?
Haven't you by chance shared the project (somewhere at GitHub or alike)?
Can't find what you're looking for? Ask the community or share your knowledge.