当前位置:网站首页>Revit secondary development - intercept project error / warning pop-up
Revit secondary development - intercept project error / warning pop-up
2022-07-07 22:23:00 【Hey, hey, hey, hey, hey】
Intercept errors in the project / Warning pop up .
public Result Execute(ExternalComandData commandData,ref string message,ElementSet elements)
{
commandData.Application.Application.FailuresProcessing += Application_FailuresProcessing;
return Result.Succeeded;
}
private void Application_FailuresProcessing(object sender,Autodesl.Revit.DB.Event.FailuresProcessingEventArgs e)
{
FailuresAccessor fa = .GetDailureAccessor();
IList<FailureMessageAccessor> lstFma = fa.GetFailureMessages();
foreach(FailureMessageAccessor item in lstFma)
{
if(item.GetSeverity() == FailureSeverity.Warning)
{
fa.DeleteWarning(item);
e.SetProcessingResult(FailureProcessingResult.Continue);
}
else if(item.GetSeverity() == FailureSeverity.Error)
{
if(item.HasResolutions())
{
// error message
string _failureMessage = fa.GetDescriptionText();
if( Is a negligible error )
{// Don't show error Popup
FailureHandlingOptions fho = fa.GetFailureHandlingOptions();
fho.SetClearAfterRollback(true);
fa.SetFailureHandlingOptions(fho);
}
e.SetProcessingResult(FailureProcessingResult.ProceedWithRollBack);
}
}
}
}边栏推荐
- How does win11 time display the day of the week? How does win11 display the day of the week today?
- 如何选择合适的自动化测试工具?
- Remember aximp once Use of exe tool
- Pdf document signature Guide
- Interview question 01.02 Determine whether it is character rearrangement - auxiliary array algorithm
- Get the exact offset of the element
- 为什么Win11不能显示秒数?Win11时间不显示秒怎么解决?
- EasyCVR配置中心录像计划页面调整分辨率时的显示优化
- OpenGL job - texture
- 【Azure微服务 Service Fabric 】如何转移Service Fabric集群中的种子节点(Seed Node)
猜你喜欢

Solve the problem of uni in uni app Request sent a post request without response.

强化学习-学习笔记9 | Multi-Step-TD-Target

Add get disabled for RC form
![[azure microservice service fabric] start the performance monitor in the SF node and set the method of capturing the process](/img/80/11c2b539c217ecd6ba55668d3e71e9.png)
[azure microservice service fabric] start the performance monitor in the SF node and set the method of capturing the process
Latest Android advanced interview questions summary, Android interview questions and answers

Have you ever been confused? Once a test / development programmer, ignorant gadget C bird upgrade

嵌入式开发:如何为项目选择合适的RTOS?

EasyCVR配置中心录像计划页面调整分辨率时的显示优化

The function is really powerful!
![Jerry's about TWS pairing mode configuration [chapter]](/img/fd/dd1e252617d30dd7147dbab25de5b4.png)
Jerry's about TWS pairing mode configuration [chapter]
随机推荐
Win11U盘不显示怎么办?Win11插U盘没反应的解决方法
Oracle advanced (VI) Oracle expdp/impdp details
Embedded development: how to choose the right RTOS for the project?
Revit secondary development - project file to family file
UWA问答精选
Add get disabled for RC form
An in-depth understanding of fp/fn/precision/recall
Paint basic graphics with custompaint
Talk about relational database and serverless
#DAYU200体验官#MPPT光伏发电项目 DAYU200、Hi3861、华为云IotDA
null == undefined
npm uninstall和rm直接删除的区别
MIT6.S081-Lab9 FS [2021Fall]
Index summary (assault version)
The latest Android interview collection, Android video extraction audio
三元表达式、各生成式、匿名函数
648. Word replacement
Preparing for the interview and sharing experience
MIT6.S081-Lab9 FS [2021Fall]
Have you ever been confused? Once a test / development programmer, ignorant gadget C bird upgrade