Programatically hide the Attribute Table in ArcMap

748
2
Jump to solution
02-22-2013 05:07 AM
GeorgeVernardos
New Contributor III
Hello all,

I need to programmatically hide the Attribute Table in ArcMap. When the table is open while performing attribute editing with arcobjects the process gets significantly delayed.

I guess that's something simple, like

            var uid = new UIDClass() { Value = "<Attribute table Uid Value>" };
            var window = ArcMap.DockableWindowManager.GetDockableWindow(uid);
            window.Show(false);

The thing is I cannot find this Uid Value.

I suppose all I need is an extensive Uid list like this old one
http://resources.esri.com/help/9.3/arcgisdesktop/com/shared/desktop/reference/ArcMapIds.htm
...updated for 10.x to contain the dockable windows. Has anybody come across such a list? Or is there another way to dig out this value, or a handle to that window?

Thanks,
George
0 Kudos
1 Solution

Accepted Solutions
NeilClemmons
Regular Contributor III
You can use ITableWindow to find the attribute window and hide it.  Here's quick VBA example you can modify.

    Dim mxDoc As IMxDocument     Set mxDoc = ThisDocument     Dim layer As IFeatureLayer     Set layer = mxDoc.FocusMap.layer(4)     Dim tableWindow As ITableWindow     Set tableWindow = New tableWindow     Dim window As ITableWindow     Set window = tableWindow.FindViaFeatureLayer(layer, True)     If window Is Nothing Then         MsgBox "Window is not visible"     Else         window.Show False     End If

View solution in original post

0 Kudos
2 Replies
NeilClemmons
Regular Contributor III
You can use ITableWindow to find the attribute window and hide it.  Here's quick VBA example you can modify.

    Dim mxDoc As IMxDocument     Set mxDoc = ThisDocument     Dim layer As IFeatureLayer     Set layer = mxDoc.FocusMap.layer(4)     Dim tableWindow As ITableWindow     Set tableWindow = New tableWindow     Dim window As ITableWindow     Set window = tableWindow.FindViaFeatureLayer(layer, True)     If window Is Nothing Then         MsgBox "Window is not visible"     Else         window.Show False     End If
0 Kudos
GeorgeVernardos
New Contributor III
This worked great, thanks Neil!
0 Kudos