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.
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:
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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register