Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Manipulate browser nodes in assembly

marius.andersen3RVB4
Enthusiast

Manipulate browser nodes in assembly

marius.andersen3RVB4
Enthusiast
Enthusiast

Need a tool for manipulating browser nodes in Inventor Assembly
After importing 3D-models from different 3D-systems the browser nodes is messed up, and there can be thousands of parts inside same assembly.

I need a tool that can help cleaning up the browser nodes.

Preferable written in iLogic, it also makes sense to use a form for controlling the code and the user input.

What do I want to do with the browser node names.

Examples

1. Replace for all browser nodes all / with _
2. Replace for all browser nodes "user input string 1" with "user input string 2"

3. Replace for all browser nodes "user input string 1" with NOTHING, meaning deleting a given part of the browser names

4. Add user "input string 1" (user input (after or before)) every instance of "user input string 2" for all browser nodes
5. Replace the last (user input string 1) for all browser nodes (with user input string 2)
6. Replace the first (user input string 1) for all browser nodes (with user input string 2)

7. Delete all parts from assembly with browser nodes containing "user input string"

For starters i would like the opportunity to give user input to code, but after testing this i would like an easy way to add hard coded rules that can be ran by one simple click after 3D-model import.


Next steps in my plan is to also include
- Ground all parts

- Delete all appearance overrides inside part files.

- Set materials to all part files based on "user input strings"

- Set appearances to all part files based on "user input strings"
- Write the _ separated parts of browser nodes into custom iProperties for all part filenames

- Do automatic component demote, to automatically create multi level sub assembly structures, based on _ separations in browser node names 




 
  

0 Likes
Replies (7)

nedeljko.sovljanski
Advocate
Advocate

Hi @marius.andersen3RVB4 

Do you have experience with iLogic or macros?

If you have you can start with

Sub Main()

    Dim oDoc As Document
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oBrowserPane  As BrowserPane
    Set oBrowserPane = oDoc.BrowserPanes("Model")
    
    Dim oBrowserNode As BrowserNode
    Set oBrowserNode = oBrowserPane.TopNode

' Run thru nodes and search strings you need
End Sub

 

0 Likes

marius.andersen3RVB4
Enthusiast
Enthusiast

Hi
Well, im in the learning stages 🙂
Spending some time on this tool will save me a lot of time later.

Thank you for your tip. 
Gives me a direction and a start

 

Marius

 

0 Likes

nedeljko.sovljanski
Advocate
Advocate

I will give you some instruction in the morning. Do you have VBA editor in your Inventor? What version of Inventor you use?

0 Likes

marius.andersen3RVB4
Enthusiast
Enthusiast

Hi Thanks
Im gratefull for your help.
I have Inventor 2021 but can also install 2022 if preferable.
I have Visual Studio Comunity installed but Im struggling to connect it to Inventor.
Specially this addin stuff.
I have been thinking of making executables instead and link each executable to buttons/triggers in Inventor ribbons.
I have allready made an addin for custom ribbons etc.

Br
Marius A

0 Likes

nedeljko.sovljanski
Advocate
Advocate

I am using 2022 but at this moment that is irrelevant due to we will work with addin code. This is excellent tutorial to make your first addin in inventor.

https://knowledge.autodesk.com/search-result/caas/simplecontent/content/my-first-inventor-plug-overv...

After this tutorial you will have skeleton for plugin.

Also you we can communicate directly nedeljko.sovljanski@teamcad.rs and at the end you can post code on forum if you want to share.

 

0 Likes

marius.andersen3RVB4
Enthusiast
Enthusiast

I will go through the tutorial, and I will come back to you when its done.

 

Br

Marius A

0 Likes

nedeljko.sovljanski
Advocate
Advocate

@marius.andersen3RVB4 

You have my mail, write me if you stuck.

0 Likes