当前位置:网站首页>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);
}
}
}
}边栏推荐
- Antd date component appears in English
- Index summary (assault version)
- DBSync新增对MongoDB、ES的支持
- Remember aximp once Use of exe tool
- 【Azure微服务 Service Fabric 】因证书过期导致Service Fabric集群挂掉(升级无法完成,节点不可用)
- 23. Merge K ascending linked lists -c language
- Kirin Xin'an operating system derivative solution | storage multipath management system, effectively improving the reliability of data transmission
- OpenGL configuration vs2019
- [开源] .Net ORM 访问 Firebird 数据库
- PDF文档签名指南
猜你喜欢

QT compile IOT management platform 39 alarm linkage

Cannot find module 'xxx' or its corresponding type declaration

Node:504 error reporting

Pre sale 179000, hengchi 5 can fire? Product power online depends on how it is sold

建立自己的网站(18)

TCP/IP 协议栈

NVR hard disk video recorder is connected to easycvr through the national standard gb28181 protocol. What is the reason why the device channel information is not displayed?

How to make agile digital transformation strategy for manufacturing enterprises

Kirin Xin'an operating system derivative solution | storage multipath management system, effectively improving the reliability of data transmission

operator
随机推荐
It's worth seeing. Interview sites and interview skills
operator
用语雀写文章了,功能真心强大!
Where is the big data open source project, one-stop fully automated full life cycle operation and maintenance steward Chengying (background)?
How does win11 unblock the keyboard? Method of unlocking keyboard in win11
Build your own website (18)
Record layoutrebuild Forcerebuildlayoutimmediate does not take effect
Jerry's key to initiate pairing [chapter]
如何实现横版游戏中角色的移动控制
Embedded development: how to choose the right RTOS for the project?
vite Unrestricted file system access to
Preparing for the interview and sharing experience
The difference between NPM uninstall and RM direct deletion
Jerry's about TWS pairing mode configuration [chapter]
How to close eslint related rules
[azure microservice service fabric] how to transfer seed nodes in the service fabric cluster
戴森官方直营店免费造型服务现已开放预约 先锋科技诠释护发造型理念,助力消费者解锁多元闪耀造型
Kirin Xin'an operating system derivative solution | storage multipath management system, effectively improving the reliability of data transmission
Revit secondary development - get the thickness / length / height of the beam
[JDBC Part 1] overview, get connection, CRUD