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: 

Custom family type by using API

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
jorgen_landqvist
1507 Views, 3 Replies

Custom family type by using API

Hi, I would like to know if it's possible to use Family API in order to make a customized Revit family.

I'm all new to this API and Revit SDK, but I'm looking for a conceptual solution of how it can be done.

 

So here's the background and description of what I want to achieve:

I have a generic Revit family (.rfa) with only a default type which holds all the geometric parameters and equations for generating a correct model. It's a master file so to speak, waiting to be configured to represent a custom solution. The user parameters are set by the customer, by filling in an online form, and sent to me configured like a Type Catalog text file.

So what I do is put the .txt. file in the same directory as the .rfa file and load the Revit family (Insert-Load Family) into an empty project. The Type Catalog dialog only contains this one custom type of course, so I click that one, and save the file back with another name, by right-clicking the family in the project browser, and chose Save. Then I mail the customer their file back.

 

Now, to speed things up for the customer, my final goal is to have this sequence run in Forge, so the customer can get the file back right away, without having to wait for me to pick up the case. But I would like to get some sort of "demo" of this working on my client first in order to get the right process with API working as intended. Sort of like an MVP for this process with APIs that also Forge can handle further down the road.

 

I'm grateful for any help here, perhaps someone has done something similar, or finds the concept interesting.

3 REPLIES 3
Message 2 of 4

Welcome to Revit and the Revit API!

  

Yes, this idea is perfectly sensible and valid and many Revit add-ins and Forge apps provide similar functionality in their own specialised areas.

  

Here is the Revit API getting started material:

  

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

  

As noted there, it helps tremendously to understand Revit and its BIM concepts from the end user point of view before diving into the API.

  

To programmatically create a family definition RFA file, equip it with parameters to control its types, load it into the project and place instances, please refer to The Building Coder topic group on the Family API, loading and placing family instances:

  

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

  

Once you have implemented your POC using the desktop .NET API, here are some descriptions about steps to take to move it to a Forge app:

  

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

  

Oh, and please note that this forum is for the desktop related aspects... Forge specific questions a better directed to the dedicated Forge help channels on StackOverflow:

  

https://forge.autodesk.com/en/support/get-help 

 

Please let us know how you fare, and good luck!

  

 

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4

Hi Jeremy!

 

Encouraging that you see that it should at least be possible.

We'll get to it then working our way forward. I'm interested to see if the Family API handles Type Catalog input right away, or if we need to set the input parameters one by one. I'll keep you posted, and get back if we get some desktop related problems.

 

Thanks!

Message 4 of 4

Afaik, if you just implement a family definition with one single (default) type defined and add a TXT text file next to it, it will pick it up as a type catalogue right out of the box. Possibly it requires correct naming of the file, or the parameters, or something. You should check with a content creation expert. That is basically UI stuff. Good luck, looking forward to hearing about your progress. It would be a neat project to document from start to finish...

  

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

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

Post to forums  

Forma Design Contest


Rail Community