Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Batch Renaming Program

25 REPLIES 25
Reply
Message 1 of 26
TA.Fehr
3838 Views, 25 Replies

Batch Renaming Program

I've written up an excel spreadsheet that works through Inventor Apprentice VBA. (I know Vault has something similar, but I don't have vault)

It pulls all the parts in an assembly and allows the user to rename any and all parts and then save them to the same or different directory.

 

I've got it functioning fairly well, but I've had trouble whenever a new part takes the name of an old part. (renaming to something completely new is no issue).

 

I've attached the file for anyone to play around with and give feedback or suggest changes.

I'd like to hear your thoughts as I know there are a few people who have run into the problem of batch renaming.

 

Note: I'm not a programmer so you'll most certainly find unorthodox things and most likely an error or two. (Primarily, the last command to move any purchased part folders or imported component folders fails because of the lockfile.lck being used by excel. I haven't figured out how to release this without closing excel)

25 REPLIES 25
Message 21 of 26
lzs013
in reply to: TA.Fehr


Thank you for sharing such a practical tool. I found a problem during the use. This tool cannot load the derived association files used in the part modeling process. So packing the associated parts to the new folder after renaming will lose these files that are not in the assembly but are associated with some parts. This causes some parts in the new assembly can't be loading properly.

Message 22 of 26
TA.Fehr
in reply to: lzs013

I'm not sure I follow exactly what you're saying, so I did a test renaming an assembly that had derived components and I found that the derived parts were replaced in the original file rather than the renamed file, this was my error. I fixed the reference and it seems to be working as expected. (See screencast)

I'm using version 2.0.0.14 (Beta)

 

Everything seems to work fine, but I've found renaming assemblies to be a very unpredictable animal, which probably explains why there aren't a lot of options, so you may still run into issues. That being said, I'm happy to address any errors you find.

 

 

Message 23 of 26
TA.Fehr
in reply to: lzs013

I replied, but my comment disappeared.

 

I'm not sure I follow exactly what you're getting at. I did a test on an assembly that had some derived parts and noticed that the derived parts were replaced in the original assembly and not the renamed one. This was my error and I have since fixed it.

 

I made a small screencast showing the process and that it does in fact work with derived components. This example was done using 2.0.0.14 (Beta)

 

I still haven't figured out all the bugs when re-using part numbers during the rename. This was proving to be rather difficult and hopefully I'll be able to address it soon. But for the time being, keep letting me know of any issues you find.

 

 

 

 

Message 24 of 26
lzs013
in reply to: TA.Fehr

I have sent my Inventor files to your email(flyinggardengnomestudios@gmail.com). You can try to rename it.

Message 25 of 26
lzs013
in reply to: TA.Fehr

 I can use this file(Inventor Renaming v2.6.xlsm) to rename Inventor2018 files, but when I load Inventor2019 files, the error shown in the figure appears. How to solve this problem?

Snipaste_2018-10-09_14-36-34.pngSnipaste_2018-10-09_15-11-36.png

Message 26 of 26
TA.Fehr
in reply to: lzs013

Unfortunately, the original excel file was built to support the Latin character set. I haven't made any updates to this spreadsheet because it has some inherent flaws. The renaming process cannot be completed by using the Apprentice Server (which is what the spreadsheet was built around). It requires opening Inventor to be able to accurately re associate the new file names.

 

If you look through the other comments you will see that the spreadsheet has been replaced by a stand-alone program. There are two versions of the program, the original and the beta. The original has limited functionality but is much more stable than the beta.

 

I tried renaming your assembly using the beta version of the program and it works as expected. However, due to the non-Latin characters, there are some errors that pop up (unable to complete a backup before rename for example).

The renaming function is included with the program. Let me know if you have any issues.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report