AddTreeBrowserPane Failing

AddTreeBrowserPane Failing

cadmageren
Enthusiast Enthusiast
477 Views
2 Replies
Message 1 of 3

AddTreeBrowserPane Failing

cadmageren
Enthusiast
Enthusiast

Can anybody tell me why I can not create a custom Browserpane?

 

Public Sub CreateBrowserPane(ByVal oDoc As Inventor.Document)
  Dim oModelPane As Inventor.BrowserPane = oDoc.BrowserPanes("Model")
  Dim oTopNode As Inventor.BrowserNode = oModelPane.TopNode
  Dim oTopNodeDef As Inventor.BrowserNodeDefinition = oTopNode.BrowserNodeDefinition
  Dim oBrowserPane As Inventor.BrowserPane = oDoc.BrowserPanes.AddTreeBrowserPane("NewPane", "internal_NewPane", oTopNodeDef)
End Sub

 

Fails in the last line...

Any suggestions?`

Michael Christoffersen

0 Likes
478 Views
2 Replies
Replies (2)
Message 2 of 3

Mike.Wohletz
Collaborator
Collaborator

I am not sure as I have not done this, but is the second argument "InternalName" either the internal name of your project or the GUID including the brackets "{}"?

if not that could be the problem..

 

0 Likes
Message 3 of 3

cadmageren
Enthusiast
Enthusiast

Actually the problem was that the Topnode must be a custom browsernode.

 

Apparantly it is not possible to add childnodes to a standard browsernode. That would however be a nice feature. I was trying to add all dependant sketches on a workplane as children to the workplane.

 

 

/Michael Christoffersen

 

0 Likes