Do you have any examples of adapting to Multi Document Interface (MDI)?
The code below will update a dockable form every time the focus changes between open drawings or if a new or existing drawing is opened/created.