[英]Selecting plan with FilteredElementCollector Revit Api
enter image description here在此处输入图像描述
I am developing an application with Revit api.我正在使用 Revit api 开发应用程序。 I'm trying to open my 3D model using FilteredElementCollector.
我正在尝试使用 FilteredElementCollector 打开我的 3D model。 I couldn't catch it first, I want to ask how can I do it?
我先抓不住,想问怎么办? I also get this error when I select another 3D model of mine.
当我的 select 另一个 3D model 时,我也会收到此错误。
Error: Autodesk.Revit.Exceptions.InvalidOperationException: 'Setting active view is temporarily disabled.错误:Autodesk.Revit.Exceptions.InvalidOperationException:'设置活动视图被暂时禁用。
Can you help with these issues?你能帮忙解决这些问题吗?
By 3D model, do you mean a 3D view? 3D model 是指 3D 视图吗?
https://www.revitapidocs.com/2015/b6adb74b-39af-9213-c37b-f54db76b75a3.htm https://www.revitapidocs.com/2015/b6adb74b-39af-9213-c37b-f54db76b75a3.htm
You'll see here that changing the active view is only possible when there is no:您会在这里看到,只有在没有以下情况时才能更改活动视图:
There is no open transaction.
没有未结交易。
IsModifiable is false.
IsModifiable 为假。
IsReadOnly is false
IsReadOnly 为假
ViewActivating, ViewActivated, and any pre-action of events (such as DocumentSaving or DocumentClosingevents) are not being handled.
未处理 ViewActivating、ViewActivated 和任何事件前操作(例如 DocumentSaving 或 DocumentClosingevents)。
Worth making sure you don't have an open transaction.值得确保您没有未结交易。 If you do, and you need one you can use the RequestViewChange method:
如果你这样做了,并且你需要一个,你可以使用 RequestViewChange 方法:
https://www.revitapidocs.com/2015/a2e920d4-2849-282e-c25f-40a4d2cbef2d.htm https://www.revitapidocs.com/2015/a2e920d4-2849-282e-c25f-40a4d2cbef2d.htm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.