开发者

Placing a library part using the Revit Api

I am usin开发者_开发百科g 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜