Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to open the Load Family dialog in Revit API

1 REPLY 1
Reply
Message 1 of 2
snertillari
1491 Views, 1 Reply

How to open the Load Family dialog in Revit API

I am writing an Revit Add-In that displays a list of families in a special Category in a form.  If there are no families of that Category in the document I want to ask the user if he wants to load a family into the document and if he wants to I want the Load Family dialog to open automatically.  Is it possible to open the Load Family dialog programmatically?  If it is possible how do you do it in code?  I can see in the Revit 2013 API documentation that there are methods in the Document Class to load a family into the document but I want to open the Load Family dialog and let the user choose the family file using that dialog.  It is the action that happens when the user clicks on "Load Family" under the "Insert" tab that I would like to activate through code.

1 REPLY 1
Message 2 of 2
saikat
in reply to: snertillari

There isn't any way to launch a Revit command using the Revit API at the moment, unfortunately.

 

You can read up on some unsupported workaround in Jeremy Tammik's blog and one such post is:

http://thebuildingcoder.typepad.com/blog/2010/11/launching-a-revit-command.html

 

Given what I just mentioned, I would recommend creating your own family load dialog whcih will help users browse to a specific folder and select a RFA file and then you can use the LoadFamily() method to load the selected family into your active project.

 

Hope this helps.

 



Saikat Bhattacharya
Senior Manager - Technology Consulting

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community