简体   繁体   English

如何在Revit Extensions(REX)平台中手动设置交易模式?

[英]How to make transaction mode manual in Revit Extensions (REX) platform?

I am using REX to develop an extension. 我正在使用REX开发扩展。 But I see the default transaction mode is set to automatic. 但是我看到默认的交易模式设置为自动。

Is it possible to make transaction manual without causing any problem with the functionality of REX classes? 是否可以手动进行交易而不会引起REX类功能的任何问题?

Is it possible to make transaction mode, partially manual (eg changing the transactionmode attribute for ExtensionRevit class only)? 是否可以将事务模式部分手动设置(例如,仅更改ExtensionRevit类的transactionmode属性)?

I discussed this question with the development team. 我与开发团队讨论了这个问题。 They explained that it is possible to switch to manual transaction in REX modules and it shouldn't cause any problem with REX classes. 他们解释说,可以在REX模块中切换到手动事务,并且REX类不会造成任何问题。 The required changes are in the in source code generated by the VS template and are only inside DirectRevitAccess.cs, where you need to switch the mode to manual and add the calls to create, start and commit the transaction. 所需的更改在VS模板生成的源代码中,并且仅在DirectRevitAccess.cs内部,您需要在其中将模式切换为手动,并添加创建,启动和提交事务的调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM