本文整理汇总了C#中Autodesk.SetRaiseWithoutDelay方法的典型用法代码示例。如果您正苦于以下问题:C# Autodesk.SetRaiseWithoutDelay方法的具体用法?C# Autodesk.SetRaiseWithoutDelay怎么用?C# Autodesk.SetRaiseWithoutDelay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Autodesk
的用法示例。
在下文中一共展示了Autodesk.SetRaiseWithoutDelay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: idleUpdate
public void idleUpdate(object sender, Autodesk.Revit.UI.Events.IdlingEventArgs e)
{
e.SetRaiseWithoutDelay();
UIApplication uiapp = sender as UIApplication;
Document doc = uiapp.ActiveUIDocument.Document;
UIDocument uidoc = uiapp.ActiveUIDocument;
while (COVER.Instance.messageQueue.Count > 0)
{
COVERMessage m = COVER.Instance.messageQueue.Dequeue();
if ((MessageTypes)m.messageType == MessageTypes.AvatarPosition || (MessageTypes)m.messageType == MessageTypes.SetView || (MessageTypes)m.messageType == MessageTypes.Resend)//read only messages
{
COVER.Instance.handleMessage(m.message, m.messageType, doc, uidoc,uiapp);
}
else
{
Transaction transaction = new Transaction(doc);
FailureHandlingOptions failOpt = transaction.GetFailureHandlingOptions();
failOpt.SetClearAfterRollback(true);
failOpt.SetFailuresPreprocessor(new NoWarningsAndErrors());
transaction.SetFailureHandlingOptions(failOpt);
if (transaction.Start("changeParameters") == TransactionStatus.Started)
{
COVER.Instance.handleMessage(m.message, m.messageType, doc, uidoc,uiapp);
if (TransactionStatus.Committed != transaction.Commit())
{
// Autodesk.Revit.UI.TaskDialog.Show("Failure", "Transaction could not be committed");
//an error occured end resolution was cancled thus this change can't be committed.
// just ignore it and dont bug the user
}
}
}
}
}