Inventor Customization

Reply
Distinguished Contributor
obourne
Posts: 171
Registered: ‎03-02-2011
Message 1 of 8 (687 Views)
Accepted Solution

Change Browser Node Icon Using iLogic

687 Views, 7 Replies
12-21-2012 01:03 PM

How can I change the default icon that shows up in the browser node in a part file? I found some VB code but can't seem to get it to work with ilogic. Any ideas?

Employee
MjDeck
Posts: 957
Registered: ‎02-24-2009
Message 2 of 8 (660 Views)

Re: Change Browser Node Icon Using iLogic

01-11-2013 12:00 PM in reply to: obourne

Attached is a rule that will work in an assembly or part.



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Distinguished Contributor
obourne
Posts: 171
Registered: ‎03-02-2011
Message 3 of 8 (653 Views)

Re: Change Browser Node Icon Using iLogic

01-11-2013 12:55 PM in reply to: MjDeck

That's AWESOME! Thanks.

Distinguished Contributor
obourne
Posts: 171
Registered: ‎03-02-2011
Message 4 of 8 (646 Views)

Re: Change Browser Node Icon Using iLogic

01-11-2013 01:53 PM in reply to: obourne

I used the code. When I used it exactly as written (except for the BMP file name) my browser node turned completely white. I suspected that in the TRY CATCH staement that "MyResource" should be the BMP file name. I changed that but the the browser node turned completely black. Not sure how to proceed

 

Also, I noticed that when I place the component in a higher assembly the browser node was displayed as default. I don't suppose there is a way for the new node BMP to be the same everywhere the file sis consumed?

 

Cheers.

 

Employee
MjDeck
Posts: 957
Registered: ‎02-24-2009
Message 5 of 8 (643 Views)

Re: Change Browser Node Icon Using iLogic

01-11-2013 02:01 PM in reply to: obourne

Can you post (attach) the .bmp file that you're using?  Is it 16 by 16 pixels?  What version of Inventor are you using?

 

I'm not sure if there is a way to make the icon show up in all assemblies. I'll try to find out.  It would be possible to do it with a complicated rule that operated on the assembly model browser tree.



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Distinguished Contributor
obourne
Posts: 171
Registered: ‎03-02-2011
Message 6 of 8 (641 Views)

Re: Change Browser Node Icon Using iLogic

01-11-2013 02:05 PM in reply to: MjDeck

The file is 16 x 16 (see attached).

 

If it's complicated to have the icopn follow on other assemblies then no need to worry about checking too deeply.

 

FYI My goal is to have an icon that will indicate when a part is created as a custom content center file. That way users will know to use the CC Change Size editor to modify it.

Employee
MjDeck
Posts: 957
Registered: ‎02-24-2009
Message 7 of 8 (639 Views)

Re: Change Browser Node Icon Using iLogic

01-11-2013 02:19 PM in reply to: obourne

I tried your bitmap and it works for me in Inventor 2013. Which version of Inventor are you using?
If the rule is not working in a particular part, please try it in an empty part.  If it works in an empty part, can you post the original part file (the one that doesn't work)?
One thing to try: On the line:
Dim cnr = bps.ClientNodeResources.Add("MyResource", 2, bmp)
Try changing the 2 to 3.  Every time you run the rule it will add a new resource (if it succeeds).



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Distinguished Contributor
obourne
Posts: 171
Registered: ‎03-02-2011
Message 8 of 8 (635 Views)

Re: Change Browser Node Icon Using iLogic

01-11-2013 03:00 PM in reply to: MjDeck

Changing 2 to 3 work!

 

:smileyhappy:

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube