当前位置:网站首页>Revit secondary development - shielding warning prompt window
Revit secondary development - shielding warning prompt window
2022-07-07 22:22:00 【Hey, hey, hey, hey, hey】
Happy new year to you all , Good luck in the year of the ox , Pay doubled !
Implementation interface
public class FailurePreprocessor : IFailuresPreprocessor
{
private string _failureMessage;
public string FailureMessage
{
get{return _failureMessage;}
set{_failureMessage=value;}
}
private bool _error;
public bool HasError
{
get{return _error;}
set{_error = value;}
}
public FailureProcessingResult PreprocessFailures(FailuresAccessor fa)
{
IList<FailureMessageAccessor> lstFma = fa.GetFailureMessages();
if(lstFma.Count() == 0) return FailureProcessingResult.Continue;
foreach(FailureMessageAccessor item in lstFma)
{
if(item.GetSeverity() == FailureSeverity.Warning)
{
_error = false;
fa.DeleteWarning(item);
}
else if(item.GetSeverity() == FailureSeverity.Error)
{
if(item.HasResolutions())
{
fa.ResolveFailure(item);
_failureMessage = fa.GetDescriptionText();
_error = true;
return FailureProcessingResult.ProceedWithRollBack;
}
}
}
return FailureProcessingResult.Continue;
}
}call
using(Transcation trans = new Transcation(doc,"hey"))
{
FailureHandlingOptions fho = trans.GetFailureHandlingOptions();
fho.SetFailuresPreprocessor(new FailuresPreprocessor());
trans.SetFailureHandlingOptions(fho);
trans.Start();
//
//
//
trans.Commit();
}边栏推荐
- 【JDBC Part 1】概述、获取连接、CRUD
- 三元表达式、各生成式、匿名函数
- Firefox browser installation impression notes clipping
- L'enregistreur de disque dur NVR est connecté à easycvr par le Protocole GB 28181. Quelle est la raison pour laquelle l'information sur le canal de l'appareil n'est pas affichée?
- How to realize the movement control of characters in horizontal game
- npm uninstall和rm直接删除的区别
- 强化学习-学习笔记9 | Multi-Step-TD-Target
- Ad domain group policy management
- Cannot find module 'xxx' or its corresponding type declaration
- 大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?
猜你喜欢

The latest Android interview collection, Android video extraction audio

使用 BlocConsumer 同时构建响应式组件和监听状态

OpenGL configuration vs2019

Use json Stringify() to realize deep copy, be careful, there may be a huge hole

Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department

ByteDance senior engineer interview, easy to get started, fluent

The function is really powerful!

null == undefined
![[JDBC Part 1] overview, get connection, CRUD](/img/53/d79f29f102c81c9b0b7b439c78603b.png)
[JDBC Part 1] overview, get connection, CRUD
![Jerry's manual matching method [chapter]](/img/92/74281c29565581ecb761230fbfd0f3.png)
Jerry's manual matching method [chapter]
随机推荐
Jerry's configuration of TWS cross pairing [article]
Customer case | China law network, through observing the cloud, greatly shortens the time of fault location
Dayu200 experience officer MPPT photovoltaic power generation project dayu200, hi3861, Huawei cloud iotda
Interview question 01.02 Determine whether it is character rearrangement - auxiliary array algorithm
变量与常量
DBSync新增对MongoDB、ES的支持
VTOL in Px4_ att_ Control source code analysis [supplement]
海外代理推荐
强化学习-学习笔记9 | Multi-Step-TD-Target
[colmap] sparse reconstruction is converted to mvsnet format input
Remove the default background color of chrome input input box
MIT6.S081-Lab9 FS [2021Fall]
This experimental syntax requires enabling the parser plugin: ‘optionalChaining‘
[open source] Net ORM accessing Firebird database
Matplotlib drawing interface settings
Welcome to CSDN markdown editor
Remember aximp once Use of exe tool
[开源] .Net ORM 访问 Firebird 数据库
Jerry's fast pairing does not support canceling pairing [article]
Record problems fgui tween animation will be inexplicably killed