- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create a dockable window. I have tried most of the solutions I have founf on this forum, but I never get it to work - All windows are collapsing to the left side:
I have adapted the code from Dockable window going empty, so it conforms to NiftyAddinTemplate:
Dim oUserInterFaceManager As UserInterfaceManager
Dim _DockableWindows As DockableWindows
Dim oDockableWindowsEvents As DockableWindowsEvents
Dim oWindow As DockableWindow
Dim StatusStrip As System.Windows.Forms.StatusStrip
Dim InstanceFound As Boolean
oUserInterFaceManager = g_inventorApplication.UserInterfaceManager
_DockableWindows = oUserInterFaceManager.DockableWindows
For Each WindowInstance As DockableWindow In _DockableWindows
If WindowInstance.Title = "DockableWindow" Then
WindowInstance.AddChild(StatusStrip.Handle.ToInt64())
InstanceFound = True
End If
Next
If InstanceFound = False Then
oWindow = oUserInterFaceManager.DockableWindows.Add("SomeOtherSortOfCliendId", "DockableWindowInternalName", "DockableWindow")
oWindow.AddChild(StatusStrip.Handle.ToInt64())
End If
If I run the above code from a button, after the document and its model, vault and iLogic-panes, it adds the dockable window as it should.
If the code is triggered before that, I get the result shown in the image above.
I belive it is because my dockable windows is created before the panes are loaded.
the question:
What event-trigger or handlers do I need to use to run the above code, so the other panes are loaded before I add the dockable code?
I can't figure it out from the examples on this forum.
I can't figure this out. The
Solved! Go to Solution.