我正在开发一个插件,将文档从中央分离出来,当它完成时,它也将被清除。我正在努力编写清除代码,我正在考虑从代码中调用Revit按钮。如果可能的话,将感谢对API的支持,或者共享在API中编写清除命令的代码。
谢谢
发布于 2017-11-10 05:25:25
Building在讨论清除和检测空视图时提供了一些清除示例的摘要。
发布于 2017-11-08 06:47:57
经过一些研究,我想出了解决办法,但也没有什么局限性。我们可以从API中调用Revit按钮,包括Purge。
限制:
以下是实现这一目标的示例代码:
UIApplication uiapp = commandData.Application;
//Store the ID of desired plugin button, in this case its 'purge unused'
String s_commandToDisable = "ID_PURGE_UNUSED";
RevitCommandId s_commandId = RevitCommandId.LookupCommandId(s_commandToDisable);
//This revit button will run at the end of your application.
uiapp.PostCommand(s_commandId);若要查找默认的revit命令id列表,请单击这里
https://stackoverflow.com/questions/47151567
复制相似问题