GetDockablePane throws exception when no document open

GetDockablePane throws exception when no document open

harrymattison
Advocate Advocate
852 Views
1 Reply
Message 1 of 2

GetDockablePane throws exception when no document open

harrymattison
Advocate
Advocate

During startup I create the pane:

 

            DockablePaneProviderData data = new DockablePaneProviderData();
            Utils.mainPage = new MainPage();
            data.FrameworkElement = Utils.mainPage;
            Utils.paneId = new DockablePaneId(new Guid(Utils.dockablePaneId));
            application.RegisterDockablePane(Utils.paneId, " ", Utils.mainPage as IDockablePaneProvider);

GetDockablePane works fine when there is a document open. But when no document is open this line throws an exception "The requested dockable pane has not been created yet.\r\nParameter name: id"

 DockablePane pane = application.GetDockablePane(Utils.paneId);

Is there any way to get the dockable pane to work with no document open? Is this a known limitation?

 

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

ol.nistratov
Contributor
Contributor

I had the same issue and the only one information I found is comment in the Revit SDK samples. So there is no way to get the dockable pane without an opened document.