Dockable panel embedded in Revit

Dockable panel embedded in Revit

pmeigneux
Advocate Advocate
552 Views
3 Replies
Message 1 of 4

Dockable panel embedded in Revit

pmeigneux
Advocate
Advocate

Hello,

 

I am using a dockable panel embedded in Revit with the following sample of code:

Code.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

One of the objectif is to get a panel in Revit in order to have a hierarchical representation of the object. See below the results when I open my first project in the Revit session:

 

Image 2.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

However, when I start to open a second model in revit and switch from a window to another, I usually get this unwanted behaviour:

  • Wrong display of the element into the dockable panel
  • Dockable panel is frozen (no interaction is possible)

Image 1.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Do you have any idea on this topic?

 

Regards,

0 Likes
553 Views
3 Replies
Replies (3)
Message 2 of 4

Sean_Page
Collaborator
Collaborator

I use the ViewActivating event handler to pass the correct "doc" to my panes and update as needed.

Sean Page, AIA, NCARB, LEED AP
Partner, Computational Designer, Architect
0 Likes
Message 3 of 4

pmeigneux
Advocate
Advocate

what function do you use for the update? and on what object (on page or webwroser)?

0 Likes
Message 4 of 4

Sean_Page
Collaborator
Collaborator

Like I mentioned, using the ViewActivated event, I just simply call an internal void method on the panes code behind that updates t/ refreshes the information inside the pane. I also have the Document opened and Document hanged event handlers calling the same method, of which the doc is a variable.

Sean Page, AIA, NCARB, LEED AP
Partner, Computational Designer, Architect
0 Likes