Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DockablePane setFloatingRectangle

4 REPLIES 4
Reply
Message 1 of 5
adcdao
221 Views, 4 Replies

DockablePane setFloatingRectangle

Hello,

 

I would like to control the dimension of my dockablepane from a button inside. So the dockable pane is already register and showing.

I would like to try something like that but I can't figured out how to get DockablePaneProviderData :

DockablePane dp = application.GetDockablePane(new DockablePaneId(new Guid("{72D8323C-1A97-4C4A-BE99-5D7CE3098B57}"))));

//How to get DockablePaneProviderData from DockablePane

DockablePaneProviderData data = ???

Autodesk.Revit.DB.Rectangle rect = new Autodesk.Revit.DB.Rectangle(200, 200, 500, 1100);

data.InitialState.SetFloatingRectangle(rect);

 

Also do I need to use an event to call this code?

 

Thanks a lot!

André

 

 

4 REPLIES 4
Message 2 of 5
jeremy_tammik
in reply to: adcdao

I cannot see any way to achieve that either, so I asked the development team for you.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 5
adcdao
in reply to: jeremy_tammik

Thank you Jeremy!

Message 4 of 5
ricaun
in reply to: adcdao

The DockablePaneProviderData is from the interface IDockablePaneProvider.

 

public void SetupDockablePane(DockablePaneProviderData data)
{
    data.FrameworkElement = this;

    data.InitialState = new DockablePaneState
    {
        DockPosition = DockPosition.Tabbed,
    };
}

 

The last time I tried to use SetFloatingRectangle was really bad, If you have two screens is hard to set in the middle or something. And that floating rectangle only gonna happen one time, after that Revit gonna remember where the user put the DockablePane.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 5 of 5
adcdao
in reply to: ricaun

Thank you!

 

It's a request from my client but I know it's not simple and I know Revit remembered the last position. But I tried to please my client.

 

André.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community