使用 Revit Api 放置库零件

发布于 2024-08-30 20:34:59 字数 290 浏览 1 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁许谁一生繁华 2024-09-06 20:34:59

UIDocument 类有一个名为“PromptForFamilyInstancePlacement”的方法,它接受符号。试一试吧。

The UIDocument class has a method called 'PromptForFamilyInstancePlacement' which accepts the symbol. Give that a go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文