Opening Form automatically when Revit Command is completed

Opening Form automatically when Revit Command is completed

mohie.morad
Contributor Contributor
375 Views
1 Reply
Message 1 of 2

Opening Form automatically when Revit Command is completed

mohie.morad
Contributor
Contributor

I want to do some thing like:

 

MyWindow wnd = new MyWindow(viewModel);

wnd.ShowDialog();

 

in this window there is a button that call The Revit Command (Adjust Analytical Model):

 

private void CorrectButton_Click(object sender, RoutedEventArgs e)
{
MyWindow.GetWindow(this).Hide();

MyApplication.PostCommand(RevitCommandId.LookupPostableCommandId(

PostableCommand.AdjustAnalyticalModel));
}

 

When the Funktion Adjust Analytical Model is closed, the window open automatically:

 

wnd.ShowDialog();

 

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

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @mohie.morad ,

try using the steps mentioned in the below link

https://forums.autodesk.com/t5/revit-api-forum/how-to-find-if-the-execution-of-command-is-complete/t... 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes