Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
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
3917 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 2 of 26
salariua
in reply to: TA.Fehr

I have been thinking about doing similar work for a while now but didn't had the time or knowledge/expertiese.

 

I am hoping others will jump in but I did test it and got error loading the assembly.

 

160429-01.gif

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 3 of 26
TA.Fehr
in reply to: salariua

Because Excel needs to communicate with the inventor files through Apprentice, you need to have the references installed in excel so it knows what objects to use:

 

1. Enable the developer tab click here for instructions.

2. Go to developer tab and click "View Code"

3. Under Tools>References make sure the following references are selected.

Capture.PNG

I know some computers don't have treeview loaded natively, so i've included it as an attachment.

 

Hope this helps with your error.

 

 

Message 4 of 26
salariua
in reply to: TA.Fehr

Let's give this thread a bump. see if we get others to answer.
Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 5 of 26
TA.Fehr
in reply to: salariua

I've been working on this program a bit in my spare time (which isn't much) and have had better successes, but there's still obviously bugs to work out.

I Intent to upload it once I've gotten it semi user-friendly, but because of time constrainst on other jobs I simply don't have the free time to work on it.

 

If people wish to take a stab at my half-baked version PM me and I'll get you the files.

Message 6 of 26
tolgay.hickiran
in reply to: TA.Fehr

I'll definetely check this tomorrow

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

Message 7 of 26
vyivanchikov
in reply to: TA.Fehr

Hi!
I apologize for my English, can you have a new version of the program, improved? Thank you in advance!
Message 8 of 26
TA.Fehr
in reply to: vyivanchikov

The version I have isn't perfect, but it has worked a few times. I need to test many types of assemblies to make sure I've caught all the errors.

 

But you can use the file and modify it as you see fit. Here is a link where you can download it.

If you change it and it works better for you please share.

 

 

Note:

I tried it again and found errors in moving files that are saved within a series of subfolders... so just another warning, this program is far from polished.

 

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

The biggest issue that I've run into is when a part name gets reused during the renaming process. Inventor will inherently use the old name even though the references get re-written to the new name.

 

If someone can help in this regard I think all the other issues I've faced would be easy enough to sort out.

Message 10 of 26
Anonymous
in reply to: TA.Fehr

has anyone made any progress with this?

 

potential to be a very useful tool!

Message 11 of 26
TA.Fehr
in reply to: Anonymous

Sorry, I've been away for a while, 

But in that time I wound up creating a completely new tool which does a ton of stuff.

 

I'm trying to get it into the app store now, but you can get your hands on the beta stand-alone here.

 

The renaming section is on the left pane, but included with that is a bunch of batch functions like print, DXF, PDF, iProperty changes, and all that fun stuff.

 

The only drawback is that I use it with my own titleblock, which you can find here, so there might be issues when trying to modify things like rev tables and reference tables.

 

Let me know what you think

Message 12 of 26
vyivanchikov
in reply to: TA.Fehr

but how does it work? launched the program, it loaded the inventory. And then what? how to choose the details, assembly ???

Version Inventor?

Message 13 of 26
TA.Fehr
in reply to: vyivanchikov

I'll try to make some tutorials next week. But the program runs alongside Inventor. The program will show whatever open documents you have selected (left side checkboxes).

 

The right window will look for all the associated  drawings of the documents that are selected in the left window.

 

The buttons on the left will perform actions on the items selected in the left window. The checkboxes on the right will affect the selected drawings in the right window.

Message 14 of 26
vyivanchikov
in reply to: TA.Fehr

Hi!

how are things with the program?

Message 15 of 26
TA.Fehr
in reply to: vyivanchikov

Sorry, I thought I'd have time around the Christmas break, but it turned out to be exactly the opposite.

 

I started creating tutorial videos this week and I began to realize how much of the program is tailored to my personal title block and manner of working, so if you're not using the exact same layout and title block as I do, the program really doesn't work to it's full potential.

 

However, if you have some specific questions about a certain task, you can PM me (flyinggardengnomestudios@gmail.com) and I may be able to get back to you in a more timely manner than having to modify the program to make it more universally applicable.

Message 16 of 26
vyivanchikov
in reply to: TA.Fehr

Hi!

how are things with the program?

Message 17 of 26

@vyivanchikov

 

There is another thread with some alternates here:

 

https://forums.autodesk.com/t5/inventor-forum/renaming-mass-amounts-of-files/td-p/6801209

 

 


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 18 of 26

Thanks!

Message 19 of 26
TA.Fehr
in reply to: vyivanchikov

Sorry for the lack of updates,

Kids and work make for much less time writing programs.

 

But I am still making slow progress. Because I'm trying to make this program work with any and all types of drawings (including custom revision fields which is proving to be rather difficult). I've had to pretty-much revamp the entire program.

 

You can find the original program in my repo here. This is the stable version but it was designed around my titleblocks and iProperty preferences, so there are limitations. Once I get the beta up and running stably, this will be the only version.

 

For the version in process, the renaming section is working and right now I'm working through the bugs with iProperties and Revision tables.

For testing purposes I've uploaded the beta version of the program here so you can fool around with it. Obviously there are going to be buttons that don't work and crashes, but I'd say I'm about 80% there.

 

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

New update,

I haven't made any changes to the original program, but the beta version is nearing completion.

I'd love to have a few people test it out and get back to me with improvements.

Because I was still figuring out how to use github last time I posted, I've relocated the beta version to it's own thread within the original. So if you had downloaded one of the old versions, you may need to uninstall it before the automatic updates will work correctly. You can find the original here, or the beta version here.


Check the changelog for issues and fixes

 

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

Post to forums  

Autodesk Design & Make Report