Hide all tab view document and restore

Hide all tab view document and restore

sizy458
Advocate Advocate
483 Views
1 Reply
Message 1 of 2

Hide all tab view document and restore

sizy458
Advocate
Advocate

Hello ,

 

i have some file rvt opened and

i want to hide all tab view and show view 3d and elevation of one rvt document and tiled document.

And after i want to restore the tab hidden.

 

How do i do for hide and restore ?

 

For tile the tab view opened.

 

        internal static void TileView(UIDocument uidoc)
        {
            //throw new NotImplementedException();
            var uiApp = uidoc.Application;
            if (uiApp != null)
            {
#if v2019
                RevitCommandId commandId = RevitCommandId.LookupPostableCommandId(PostableCommand.TileViews);

                if (uiApp.CanPostCommand(commandId))
                {
                    uiApp.PostCommand(commandId);
                }
#endif
            }
        }

 

 Thank.

0 Likes
484 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

I do not believe that the Revit API provides much direct support for these kind of operations, so I am afraid you are stuck with the Revit user interface functionality and the possibility to use PostCommand to launch built-in Revit commands, just as you point out yourself.

  

You may be able to make some use of the UIDocument GetOpenUIViews method to get a list of all open view windows, and the ActiveView property to get and set the currently active view of the currently active document:

 

https://www.revitapidocs.com/2020/b6adb74b-39af-9213-c37b-f54db76b75a3.htm

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes