Having trouble with DockableWindow SetDockingState()

Having trouble with DockableWindow SetDockingState()

machiel.veldkamp
Collaborator Collaborator
234 Views
3 Replies
Message 1 of 4

Having trouble with DockableWindow SetDockingState()

machiel.veldkamp
Collaborator
Collaborator

Hi. I wish to make a rule that resets the dockable windows when Inventor inevetably forgets their location on startup.

 

What I want to achieve:

machielveldkamp_0-1742467967209.png

 

 

I'm having trouble with the 'ilogic' window in the bottom right.

I'm trying to set the dockingstate to dock to the bottom of the VAULT window.

 

However, that seems to not be allowed.

 

Is there anyone that can give me some pointers?

 

'iLogic Browser "dockable window" information:
oInternalName = "ilogic.treeeditor"
VaultPane = "vault"
ModelPane = "model"

oClientID = "{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}"
oTitle = "iLogic"

For Each oDockableWindow As Inventor.DockableWindow In ThisApplication.UserInterfaceManager.DockableWindows
	
	If oDockableWindow.InternalName = VaultPane Then
		oObject = oDockableWindow
		oDockableWindow.Width = 250
		oDockableWindow.SetDockingState(4)	
	End If
	If oDockableWindow.InternalName = ModelPane Then
		oDockableWindow.Width = 300
		oDockableWindow.SetDockingState(2)			
	End If
	If oDockableWindow.InternalName = oInternalName Then
		If Not oDockableWindow.Visible = True Then
			oDockableWindow.Visible = True
		End If
		oDockableWindow.Width = 250
		'The line below breaks on the "1" parameter since it is disabled for that windowtype ("ilogic.treeeditor"). 
		oDockableWindow.SetDockingState(1, oObject)
	End If

Next

 

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

___________________________
0 Likes
235 Views
3 Replies
Replies (3)
Message 2 of 4

jjstr8
Collaborator
Collaborator

I doubt you'll be able to do what you want. It's a very broken process. There seems to be no way to "tear off" from a tabbed dockable collection. When you SetDockingState on a DockableWindow that's in a tabbed collection, everything else goes with it. Also, the DockToObject doesn't seem to really do much. I also found it's pretty easy to end up with blank dummy copies of a window. You're only option with those is to drag it on to the real dockable window and see if Inventor gets rid of it. The 'X' button doesn't close them.

0 Likes
Message 3 of 4

g.georgiades
Advocate
Advocate

I had similar issues almost 4 years ago and got no responses... the viewtab moves/closing implementation is inherintly buggy.

https://forums.autodesk.com/t5/inventor-programming-ilogic/viewframe-viewtab-viewtabgroup-crashes-bu...

0 Likes
Message 4 of 4

machiel.veldkamp
Collaborator
Collaborator

@Curtis_WaguespackIs this anything you have dealt with in the past?

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

___________________________
0 Likes