Revit API

Reply
Active Member
snertillari
Posts: 7
Registered: ‎12-05-2012
Message 1 of 2 (587 Views)

How to open the Load Family dialog in Revit API

587 Views, 1 Replies
12-05-2012 07:58 AM

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.

Employee
saikat
Posts: 185
Registered: ‎08-16-2007
Message 2 of 2 (573 Views)

Re: How to open the Load Family dialog in Revit API

12-06-2012 01:25 PM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit

Twitter

Facebook

Blogs

Youtube