- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello together,
how could I show and hide dockable windows via API?
Thanks
Georg
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Check the Programming Help for an example, methodes and properties, search for "DockableWindow Object".
This is a code example found in the help:
Sub DockableWindow()
Dim oUserInterfaceMgr As UserInterfaceManager
Set oUserInterfaceMgr = ThisApplication.UserInterfaceManager
' Create a new dockable window
Dim oWindow As DockableWindow
Set oWindow = oUserInterfaceMgr.DockableWindows.Add("SampleClientId", "TestWindowInternalName", "Test Window")
' Get the hwnd of the dialog to be added as a child
' CHANGE THIS VALUE!
Dim hwnd As Long
hwnd = 4851096
' Add the dialog as a child to the dockable window
Call oWindow.AddChild(hwnd)
' Don't allow docking to top and bottom
oWindow.DisabledDockingStates = kDockTop + kDockBottom
' Make the window visible
oWindow.Visible = True
End Sub
Regards,
Eelco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If you named your dockable window with internal name "TestWindowInternalName" as was done in the above sample code, then this code will hide it:
Sub HideDockableWindow()
Dim oUserInterfaceMgr As UserInterfaceManager
Set oUserInterfaceMgr = ThisApplication.UserInterfaceManager
Dim oWindow As DockableWindow
Set oWindow = oUserInterfaceMgr.DockableWindows("TestWindowInternalName")
oWindow.Visible = False
End Sub
Not sure what you mean by viewcube? :-s
Cheers,

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Adam,
I could hide my dockable window now. I found the solution to hide the viewcube:
ThisApplication.CommandManager.ControlDefinitions.Item("AppViewCubeCmd").Execute
How could I get the internalname from other add-ins?
Thanks
Georg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Georg,
have a look at the PrintCommandNames function here:
http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html
Cheers,

Adam Nagy
Autodesk Platform Services