Revit family linking through Add-Ins and custom ribbons

Anonymous

Revit family linking through Add-Ins and custom ribbons

Anonymous
Not applicable

Hi all,

 

I am currently working with the BIM team at work and have created a standard set of architectural detail families to be used across the board.

 

What i would like to do know is how can i create direct insert links to these families through our projects. 

 

To break it down simply, i have created a custom ribbon menu which for example is called Details and within that ribbon there are buttons such as, wall detail, floor detail, glazing detail etc. I have gotten this far as to make the ribbon but they do no do anything yet. What i would like to do is be able to click 'wall detail' and it insert a linked family file that i manually set off our server. 


Now i know that the simple way of doing this is to load all the detail families into a template file and they can then be selected through there but unfortunately we have many different templates due to project type constraints etc.

 

Is this something that is even possible and if so can someone help me out with some coding on how to do this. I am not very good at coding but am imagining that its as simple as telling the 'wall detail' button when pressed to open the family which is directed to a link that i have specified in the code.

 

Your help is much appreciated.

Reply
638 Views
5 Replies
Replies (5)

wezpb
Advocate
Advocate

Did you ever get a answer to this query? I'd like to do a similar thing, so if you did would you be able to share?

 

Thanks.

0 Likes

jeremy_tammik
Autodesk
Autodesk

Yes, this is pretty simple.

 

First of all, welcome to the Revit API.

 

Before doing anything else, I would suggest working through the getting started material:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#2

 

That covers all you need to know to solve your task.

 

You say that you already implemented an external application and the buttons you require. Congratulations.

 

Next, you can hook up each button with an external command.

 

In the external command, check if the required family has already been loaded. If not, load it. Once it is loaded, place instances of your detail items. This is also covered by The Building Coder topic groups on loading families and placing instances:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.25

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

wezpb
Advocate
Advocate
I'll take a look at this, thanks for your contribution
0 Likes

wezpb
Advocate
Advocate

You wouldn't have an example of the code for this would you?

0 Likes

jeremy_tammik
Autodesk
Autodesk

Sure. The code I pointed out above includes a dozen or so.

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes