使用 Revit Api 放置库零件
我正在使用 Revit API 导入族符号。下面的代码可以正常工作,但它将族加载到 Revit 中,然后您必须手动将其从族树中拖动或使用相关族工具插入。
Document document = commandData.Application.ActiveDocument;
document.LoadFamilySymbol(fileName, name, out gotSymbol);
我如何让它询问用户想要将其放置在哪里? (类似于编辑族时单击“加载到项目”),因此他们不必将其从族树中拖动。
I am using the Revit API to import a family symbol. The code below is working though it loads the family into Revit and then you have to manually drag it from the families tree or insert using the relevant family tool.
Document document = commandData.Application.ActiveDocument;
document.LoadFamilySymbol(fileName, name, out gotSymbol);
How do I get it to the point where it is asking the user where they want it placed? (similar to when you click "load into project" when you are editing a family) so they don't have to drag it from the families tree.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UIDocument 类有一个名为“PromptForFamilyInstancePlacement”的方法,它接受符号。试一试吧。
The UIDocument class has a method called 'PromptForFamilyInstancePlacement' which accepts the symbol. Give that a go.