Thanks Sanjay for directing me.
I also have been trying to have a custom Browser made using Inventor API and the following is the code. When I run this code as an external Addin (EXE), before it builds, I get an error {color:#ff0000}
"No overload for method 'CreateBrowserNodeDefinition' takes '3' "
{color}
**************************
//Declare BrowserPanes
Inventor.BrowserPanes m_browserPanes = m_assemblyDocument.BrowserPanes;
Inventor.ClientNodeResources m_clientNodeResources = m_browserPanes.ClientNodeResources;
//load image icons for UI items
Icon documentNameIcon = new Icon(this.GetType(), "docName.ico");
stdole.IPictureDisp m_icon1 = (stdole.IPictureDisp)Support.IconToIPicture(documentNameIcon);
Inventor.ClientNodeResource m_topNodeClientResource = m_clientNodeResources.Add("Test", 1, m_icon1);
//Add Top Node
Inventor.BrowserNodeDefinition m_topNodeDefinition = m_browserPanes.CreateBrowserNodeDefinition("Top Node", 3, m_topNodeClientResource);
Inventor.BrowserPane m_customBrowserPane = m_browserPanes.AddTreeBrowserPane("My Pane", "TestBrowser", m_topNodeDefinition);
*******************************************
From this thread
ht tp://discussion.autodesk.com/forums/thread.jspa?messageID=5748644
It is evident that there is some problem with CreateBrowserNodeDefnintion in .Net as it returns a ClientBrowserNodeDefinition . So, even after changing the above code to the following, I get the same error message {color:#ff0000}
"No overload for method 'CreateBrowserNodeDefinition' takes '3' " {color}
Inventor.ClientBrowserNodeDefinition m_topNodeDefinition =
m_browserPanes.CreateBrowserNodeDefinition("Top Node", 3,
m_topNodeClientResource);
Inventor.BrowserPane m_customBrowserPane = m_browserPanes.AddTreeBrowserPane("My Pane", "TestBrowser", (Inventor.BrowserNodeDefinition)m_topNodeDefinition);
**********************************************
In the thread
ht tp://discussion.autodesk.com/forums/thread.jspa?messageID=2375910
Brian explains why IPictureDisp could be creating problems for BrowserNode icons, but that thread dates back to 2004. In another similar thread, someone had been successful after converting his code in C# to an internal Addin and his CustomBrowserPane had worked, but even after I had the above code in an internal addin, at the time of building it, I was getting the same error message.
By the way, I was successful in implementing the BrowserNode example code in VBA and it worked as expected.
I again seek guidance from Sanjay and others to enlighten me in this regard.
Thanks & Regards,
Rajeev Lochan
http://www.smallguru.com
http://www.ar-cad.com
Inventor 2008, Win XP