Save entire assembly as filename = browser node

Save entire assembly as filename = browser node

marius.andersen3RVB4
Enthusiast Enthusiast
563 Views
7 Replies
Message 1 of 8

Save entire assembly as filename = browser node

marius.andersen3RVB4
Enthusiast
Enthusiast

Hi.

I need some urgent help.

I need a iLogic script that does the following:

1. Write browser node name to a custom iProperty for all parts and subassemblies in current assembly.

2. Saves my entire current main assembly fileset as new files, with filename =browser node, in chosen choosen directory.

 

This saves me for a ton of work.

We are talking about Assembly of 8000 files.

 

Thanks

Marius Andersen

 

 

 

 

 

0 Likes
564 Views
7 Replies
Replies (7)
Message 2 of 8

bradeneuropeArthur
Mentor
Mentor

Do you have an example of the browser and what names need to be written back?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 8

marius.andersen3RVB4
Enthusiast
Enthusiast

Hi.
Yes I can try to explain better.

I have imported a STEP file into Inventor.
After Import i got a .iam fil with a huge bunch of .ipt files named typical Solid01, Solid02 etc.
To clean up this mess I have used demote functionality to create a Assembly - Sub Assembly - Sub Assembly - Part structure.
After creation of this structure, I got a quite tidy model.
Next problem is that all the names on the part files, .ipt, are as explained above Solit01, Solid02 etc.
Also the filenames of the Assembly files, .iam, are wrong.
To sort this out I have renamed the Browser nodes.
Meaning..... I have written new names on parts and assemblies in the Model Browser.
Its tidy in Inventor but a mess on the harddrive.

My plan...
Just save everything (entire model) as a new fileset.
When inventor is saving the files it should use the new names in the model browser as filename.

The script has to read this new names from the model browser of the Main Assembly file. At the top of the hierarchy, and then save all this files with the new filename.

PSEUDOCODE
Read through entire model browser structure
make array, Two columns, (Old filename) and browser node name (New filename)
Start saving routine
Ask user for path to save folder/location
Start saving from top of list
This filename as this new filename at choosen folder/location

Nice to have....
Files to be saved in folder structure instead of one single folder
folder structure matching the assembly-structure with new names
8000 files in same folder is a bit messy 🙂

The next thing,
about this custom iProperty is also an extra nice to have.
When all files are saved with new filenames the script just have to create a new custom iProperty named EZ_name and set the value of this iPorperty to the same as the filename (without extension)
For each file of course.

PSEUDOCODE
Read through entire structure
Create cusom iProperty in all files
Set value of each iProperty to the same as the filename.

 

I will gladly answer more questions.
A solution for this project saves me for tremendous work, and this can be a solution for more people who is importing Step files with no structure.
 

0 Likes
Message 4 of 8

marius.andersen3RVB4
Enthusiast
Enthusiast

mariusandersen3RVB4_0-1673995508585.png

Renamed Browser node with XXXX

 

mariusandersen3RVB4_2-1673995726551.png

 

 

0 Likes
Message 5 of 8

jjstr8
Collaborator
Collaborator

If you're taking the time to demote components into a preferred assembly structure and rename browser nodes, why wouldn't you demote to assemblies with their correct final name and use the "Save and Replace" to handle the parts?

0 Likes
Message 6 of 8

marius.andersen3RVB4
Enthusiast
Enthusiast

Reason why I do it like this..
Basically, because I dont know the name of the assembly before I know the content.
Will have to drag and drop parts from and to different subassemblies until design is ready.
This is construction og 10.000 metric tonnes, so you dont know the installation sequence at start.
Names is standardised, and is given by the content of the assembly. 
Names of assemblies and parts will change several times before design is finished.
The absolutely fastest manual work for givving names is by renaming browser nodes.
Fastest way to make hierarchy is to just start demoting to assemblies with random names, and then just drag and drop parts between them until structure split is ready.

After this job is done I need this special "pack and go" functionality that sets the filenames to the browser nodes.

Example.
You have an assembly with all parts of a car.
Flat structure.
You need to make the structure to design your car-fabrication line.
You dont know on forehand what each assembly-station can handle.
It can be criterias of robot-payload, assembly time,..... for each station.
You need to take this in account when you make the assembly structure.
Therefore, at start, you dont know if the engine should be in the same assembly as the rest of the driveline. 
You have to play around in the structure to meet the criterias of each assembly-station.

Then you just make the structure
Give it names
And do the pack and go routine when you are satisfied.

0 Likes
Message 7 of 8

marius.andersen3RVB4
Enthusiast
Enthusiast

I think the productivity tool found here can do the half of the job.

mariusandersen3RVB4_1-1674067472330.png

I just need help to run this for all files in the assembly, and use the browser node as the filename.
I think that could be done by iLogic code, but I dont know how to.

0 Likes
Message 8 of 8

jjstr8
Collaborator
Collaborator

I see what you're trying to do.  If you're asking someone to write the code for you, you might find someone with the time to do so.  Unfortunately, I am unable to do so at the moment.  I do have a suggestion on your procedure.  Rather than rename the browser nodes, I would add a Custom iProperty Column to the structured BOM view where you can enter a new filename.  Set the structured BOM view to All Levels and navigate through it like the browser.  I think using the browser nodes can make it a little more complicated.  Since it's based on component occurrences, when you rename a part that's used many times you'll only see if renamed for the one occurrence.  If it's a custom iProperty, it will show up for all occurrences across multiple sub-assemblies and you'll immediately know it's already been renamed.

0 Likes