How to tile 2 window using api?

How to tile 2 window using api?

Shai.Nguyen
Advocate Advocate
1,201 Views
1 Reply
Message 1 of 2

How to tile 2 window using api?

Shai.Nguyen
Advocate
Advocate

Hi everyone,

Have a good day.

May I ask about to tiling 2 window in Revit, in case many views are opened. I just want 2 windows of that will be arranged side by side. (same function with arrange window in auto section box)

arrange.PNG

I have researched about that and maybe it related to win32, it's nice if someone can explain about that or if there are some documents can solve that, please provide to me.

Thank you and your solution is highly appreciated.

0 Likes
1,202 Views
1 Reply
Reply (1)
Message 2 of 2

Revitalizer
Advisor
Advisor

Hi,

 

before the docking/tabbing system introduced in Revit 2019, one could move and resize the windows inside the multi document window, using fast Win API.

But since 2019, Revit uses the AvalonDock framework.

There aren't any window handles any more.

They are still accessible via UIAutomation, but that's very slow.

 

There is a built in command, but it tiles all opened windows.

Just for completeness' sakeness:

 

RevitCommandId commandId = RevitCommandId.LookupPostableCommandId(PostableCommand.TileViews);

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

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes