Message 1 of 5
Not applicable
08-05-2017
10:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm want to learn how to use the post command correctly. My attempt is to show a Sync display dialog. I can use it once but after the second try I get an exemption message : "Revit does not support more than one command are posted". How can I ensure that when the window from SynchronizeAndModifySettings is done I finish my post?
The method is very simple.
public void SynchronizeWithCentralWindow(Document doc, UIApplication uiapp)
{
var syncCmd = RevitCommandId.LookupPostableCommandId(PostableCommand.SynchronizeAndModifySettings);
try
{
uiapp.PostCommand(syncCmd);
}
catch (Exception ex)
{
string message = ex.Message;
}
}
thank you.
Solved! Go to Solution.