Inventor Customization

Reply
Valued Mentor
saseendrankombath
Posts: 354
Registered: ‎11-11-2005
Message 1 of 8 (340 Views)

change browser folder icon

340 Views, 7 Replies
11-13-2012 06:18 PM

is it possible to change browser folder icon?

ADN Support Specialist
adam.nagy
Posts: 521
Registered: ‎03-26-2007
Message 2 of 8 (316 Views)

Re: change browser folder icon

11-21-2012 08:24 AM in reply to: saseendrankombath

Hi,

 

I'm not sure I understand the question. The folder icon of what and where exactly?

 

I think it would be useful to provide an image of what the current situation is vs. what you'd like to get.

 

Cheers,



Adam Nagy
Developer Technical Services
Autodesk Developer Network
Valued Mentor
saseendrankombath
Posts: 354
Registered: ‎11-11-2005
Message 3 of 8 (313 Views)

Re: change browser folder icon

11-21-2012 08:38 AM in reply to: saseendrankombath

Please find attached, The browser folder inside assembly document, To replace the standard icon with a custom icon

ADN Support Specialist
adam.nagy
Posts: 521
Registered: ‎03-26-2007
Message 4 of 8 (298 Views)

Re: change browser folder icon

11-22-2012 06:33 AM in reply to: saseendrankombath

Hi,

 

Changing the icon of a native browser node is similar to setting the icon of your own panel's client node, but you work with NativeBrowserNodeDefinition and set the OverrideIcon property instead.

Sub ChangeIcon()
    Dim bps As BrowserPanes
    Set bps = ThisApplication.ActiveDocument.BrowserPanes

    ' e.g. if you want to change the root node's icon
    ' in the assembly "Model" panel
    Dim bp As BrowserPane
    Set bp = bps("AmBrowserArrangement")
        
    Dim bmp As IPictureDisp
    Set bmp = LoadPicture("C:\Bitmap1.bmp")
        
    Dim cnr As ClientNodeResource
    ' Only Bitmaps are supported by the Add method
' and it should be 16x16 Set cnr = bps.ClientNodeResources.Add( _ "MyResource", 2, bmp) Dim nbnd As NativeBrowserNodeDefinition Set nbnd = bp.TopNode.BrowserNodeDefinition nbnd.OverrideIcon = cnr End Sub

I hope this helps.

 

Cheers,



Adam Nagy
Developer Technical Services
Autodesk Developer Network
Valued Mentor
saseendrankombath
Posts: 354
Registered: ‎11-11-2005
Message 5 of 8 (258 Views)

Re: change browser folder icon

12-25-2012 10:34 AM in reply to: adam.nagy

Gives Add Method Error. See Attachment

ADN Support Specialist
philippe.leefsma
Posts: 562
Registered: ‎06-02-2009
Message 6 of 8 (228 Views)

Re: change browser folder icon

01-08-2013 12:35 AM in reply to: saseendrankombath

Hi,

 

I believe this code is unlikely to succeed on 64-bit because VBA is running out of process. You would need either to use 32-bit VBA or try the same from a VB.Net/C# add-in. The way to load resources if different however in .Net.

 

You can refer to the following articles:

 

hhttp://adndevblog.typepad.com/manufacturing/2012/06/how-to-convert-iconbitmap-to-ipicturedisp-witho...

 

http://adndevblog.typepad.com/manufacturing/2012/08/change-the-browser-node-icon.html

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

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

Re: change browser folder icon

01-11-2013 11:27 AM in reply to: saseendrankombath

Attached is an iLogic rule that will work for an assembly or part document.



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

Valued Mentor
saseendrankombath
Posts: 354
Registered: ‎11-11-2005
Message 8 of 8 (192 Views)

Re: change browser folder icon

01-13-2013 06:04 PM in reply to: saseendrankombath

Thanks

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