当前位置:网站首页>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();
}边栏推荐
- 使用 BlocConsumer 同时构建响应式组件和监听状态
- Pdf document signature Guide
- DNS series (I): why does the updated DNS record not take effect?
- Solve the problem of uni in uni app Request sent a post request without response.
- 大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?
- PKPM 2020 software installation package download and installation tutorial
- Which futures company is the safest to open a futures account?
- Record problems fgui tween animation will be inexplicably killed
- Win11游戏模式怎么开启?Win11开启游戏模式的方法
- EasyCVR配置中心录像计划页面调整分辨率时的显示优化
猜你喜欢

Add get disabled for RC form

PDF文档签名指南
![[azure microservice service fabric] the service fabric cluster hangs up because the certificate expires (the upgrade cannot be completed, and the node is unavailable)](/img/35/1bb21c100980eb1075dbbcb922e181.png)
[azure microservice service fabric] the service fabric cluster hangs up because the certificate expires (the upgrade cannot be completed, and the node is unavailable)

. Net automapper use

Matplotlib快速入门

Px4 autonomous flight

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

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?

Reinforcement learning - learning notes 9 | multi step TD target

Anti climbing killer
随机推荐
The difference between NPM uninstall and RM direct deletion
PKPM 2020 software installation package download and installation tutorial
L2: current situation, prospects and pain points of ZK Rollup
What if the win11u disk does not display? Solution to failure of win11 plug-in USB flash disk
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?
应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设
Pre sale 179000, hengchi 5 can fire? Product power online depends on how it is sold
【JDBC Part 1】概述、获取连接、CRUD
DBSync新增对MongoDB、ES的支持
Time standard library
Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘
An in-depth understanding of fp/fn/precision/recall
Jerry's about TWS channel configuration [chapter]
[azure microservice service fabric] the service fabric cluster hangs up because the certificate expires (the upgrade cannot be completed, and the node is unavailable)
Two kinds of updates lost and Solutions
The whole network "chases" Zhong Xuegao
How polardb-x does distributed database hotspot analysis
Cannot find module 'xxx' or its corresponding type declaration
How to quickly check whether the opening area ratio of steel mesh conforms to ipc7525
Overseas agent recommendation