public void ShowForm(UIApplication uiapp)
{
// If we do not have a dialog yet, create and show it
if (RvtWindow != null) return;
// A new handler to handle request posting by the dialog
ExtOpenView handler = new ExtOpenView();
// External Event for the dialog to use (to post requests)
ExternalEvent m_event = ExternalEvent.Create(handler);
// We give the objects to the new dialog;
// The dialog becomes the owner responsible for disposing them, eventually.
RvtWindow = new RevitWindow(uiapp, m_event, handler);
RvtWindow.Show();
}