Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

renaming parts

43 REPLIES 43
Reply
Message 1 of 44
safiredesignengineers
9950 Views, 43 Replies

renaming parts

hey group

 

is it possible to simply rename a part?

I quite often make up quick parts to try stuff out and call them random things but if I want to change the name it is not just a simple case of renaming the part as a few things need updating.

 

is there a simple quick way to rename a part in one hit without going through other stuff?

 

regards Adrian

43 REPLIES 43
Message 21 of 44
DevinCurrie
in reply to: Mario428

I understand your concern but at the same time file management can easily become a nightmare. I guess the author can either:

 

1) add in a popup dialog asking the end user if they wish to keep the original file or to delete it

 

or

 

2) add in code that will delete the original and comment these line(s) out. This can toggle the behaviour this way.

 

or

 

3) after successful rename, relocate original into archive folder so we separate dormats from the active files.

Message 22 of 44
pball
in reply to: DevinCurrie

Well the author originally made this script for the purpose of when parts are reused from an old project have to be changed and a new copy has to be saved so it can be edited without affecting the original part from the old project. So in short this script was not made to rename, just create a new copy which is does smashingly.

That being said I should be able to add a popup asking if you want to delete the original part after it replaces it or just have it auto delete. That'll have to wait until I get some time to fiddle around with it though.

Message 23 of 44
DevinCurrie
in reply to: pball

Yes please. Thanks! 🙂

Message 24 of 44
pball
in reply to: DevinCurrie

Ok here is an update that will ask if you want to delete the original part. There are also instructions to remove that function or make it autodelete without asking.

Message 25 of 44
DevinCurrie
in reply to: pball

Works awesome. Thanks! 🙂

 

I have been using the macro quite a bit this morning and discovered another issue.

 

Since I'm working on a fairly large project, having all files inside one folder can get confusing. Hence I group all related part files within their own subfolder and create an assembly file within. The next higher will call the sub assembly from within the subfolder.

 

The macro will cause the newly renamed file to sit at root rather than place it inside the same subfolder where the original sits.

 

For example, we have the following files:

 

main.iam  <-- in root folder

  subassy1.iam  <-- in sub folder "subassy1"

    part1.ipt  <-- in sub folder "subassy1"

    part2.ipt  <-- in sub folder "subassy1"

 

Renaming subassy1.iam to subassy2.iam will cause the following to happen:

 

main.iam  <-- in root folder

subassy2.iam  <-- in root folder

    part1.ipt  <-- inside sub folder "subassy1"

    part2.ipt  <-- inside sub folder "subassy1"

 

Likewise renaming sub assembly part that's sitting inside the sub folder will show up at root.

 

Thanks,

 

Devin

Message 26 of 44

Hi I have seen this topic pop up again but not had a chance to read through all the latest entries, if it helps what i ended up doing is:

 

if i created a part that i wanted to rename and use differently, i would open the part - click save as - save as a new inventor part with the new file name.

i would then open up the new part and modify, change etc..

and then in assemblies you can right click on a part and go - component - replace

and this up dates the new part and keeps al the constraints etc..

 

it works for me and is really simple.

 

regards Adrian

Message 27 of 44

Hi! Or, you can use Design Assistant to open the assembly and rename the parts there. There is room for improvement in this workflow. It seems like renaming a component in Inventor could be confusing and cumbersome. To allow flexible naming, the browser name can be different than the file name. Also, each component occurrence can have a different browser name, although they all point to the same file. This is a behavior requested by customers particularly reusing components in multiple assemblies.

Another workflow to help rename the component it simply save the component as a different name. Then use Replace Component command (right-click on the occurrence in the assembly -> Component -> Replace -> select the newly saved component document.

Thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 28 of 44
pball
in reply to: DevinCurrie

DevinCurrie Are you talking folders in the inventor browser or windows folders? If you are talking windows folders I don't see why this is an issue as you can choose the location to save the new "renamed" file. As for browser folders I don't use those often and would have to play around.
Message 29 of 44

Yes but the point is that the macro was developed to automate the steps involved when all we want is to simply rename a part or assembly.

Message 30 of 44
DevinCurrie
in reply to: johnsonshiue

OK I'll try out Design Assistant to see if it helps.

 

Yes I saw that the browser name and file name can be different. I feel that the "disconnection" is a bad idea and will not help make file management any easier.

Message 31 of 44
pball
in reply to: DevinCurrie

DevinCurrie
You did not answer my question. Also this macro was NOT designed to rename parts, just replace them with a new copy. If someone was inclined to they could modify the script to streamline it more, so it's more like the renaming function you want.
Message 32 of 44
DevinCurrie
in reply to: pball

I mean the Windows folder. I've tried what you suggest and at first it seems to work but then when I tried to rename the same part, Inventor crashed. Same story on my second attempt. So ended up fixing the problem the manual ways.

Message 33 of 44
DevinCurrie
in reply to: pball

Well ok but I'd say that the macro already did the job superbly. It just needs a few more additional tweaks to make it practical for real use. (e.g. renamed copy saved inside the same folder as original). Thanks for your help anyway regardless of whatever decision you decide to take.

Message 34 of 44
Mario428
in reply to: pball

Have to say for Pball this thread has turned into a "no good deed goes unpunished!!!" deal.

Offered up a macro that does what he wanted it to do, was kind enough to modify it per someone's wishes and then got to defend its "supposed" bad points for a couple of days.

I can only laugh!!!!

 

I added the macro, it does as intended and works for me

Message 35 of 44

What a mess!!! 

this is the answer:

https://www.youtube.com/watch?v=YM8mPqI_cII

Message 36 of 44

Hi,

Please try.

 

https://apps.exchange.autodesk.com/INVNTOR/en/Detail/Index?id=appstore.exchange.autodesk.com%3aaddin...

Cristiano Oliveira
Developer Addins | Consultant CAD/PLM | CAD Manager
https://www.ConsultCAD.com/


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 37 of 44
crobarcro
in reply to: SBix26


@sbixler wrote:

I'm curious how you would expect this to work?  Right click on a component in an assembly and pick "Rename"?  Then what?  It offers you a Rename Part dialog box?  You type the name you want, hit OK, then what happens?  The part/assembly file is renamed, and the current assembly's reference to that part/assembly file is updated.  Now what?  What about other files that reference that component?  Drawings, other assemblies, derived parts?  How does Inventor know what to do without reading your mind?

 

No, I don't work for Autodesk.  But I have a certain amount of sympathy for programmers who get told by users that the new functionality they want is simple.


Well I'm a programmer and I'll tell you how you do it. You save the name of the part in a variable in the file instead of using the bloody file name as the part name.

Message 38 of 44
pball
in reply to: crobarcro

Sadly that wouldn't work so well in real life. For instance how do you find a part file when you have the part number and the file name is essentially random. Having file names match part numbers works quite well my personal experience. I also haven't had to rename parts in a way that causes large issues, in fact I hardly rename and usually replace parts instead.
Message 39 of 44

Wow.... I didn't take the time to read this whole thread, but I use Design Assistant to work with renaming files. The program can be very slow if your dataset is large, but it works. It has the capability to search your Project for linked files and update links accordingly.

Message 40 of 44
DRoam
in reply to: DRoam

Oh, and another way is to create a drawing with one view of all of the assemblies that contain whatever part you want to rename. Save the drawing and close it, along with all your other open Inventor documents. Then rename your part in Explorer. Then open the drawing and tell it where to find the file you renamed. It will update all of the referencing assemblies in one shot. Save the drawing and close it.

 

Of course, if you want to rename several files, this can get messy. That's when I use Design Assistant.

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

Post to forums  

Autodesk Design & Make Report