[.Net API] How to create familyInstance of the same parametric family with different parameters one by one?

[.Net API] How to create familyInstance of the same parametric family with different parameters one by one?

choshQT24J
Enthusiast Enthusiast
321 Views
2 Replies
Message 1 of 3

[.Net API] How to create familyInstance of the same parametric family with different parameters one by one?

choshQT24J
Enthusiast
Enthusiast

I have a parametric family. For example the parameter is length.
And I want to create several familyInstance with different length.
How should I do in revit api?
Is the only way is to create each type for each new paraters set?

Sorry for my English.

Accepted solutions (1)
322 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

It depends on the family definition and other characteristics of the family, but yes, the process you describe is one typical way to achieve that.

  

If the parameter of interest is a family type (== symbol) parameter, then you would normally create a separate family symbol for each required parameter value and use that to place the family instances using that value.

  

Here is some sample code demonstrating how to duplicate an existing wall type and modify its parameters to create a new type:

  

https://thebuildingcoder.typepad.com/blog/2008/11/creating-a-new-family-symbol.html

  

A very similar approach works for parametric families as well.

  

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

choshQT24J
Enthusiast
Enthusiast

It works like a charm. Thanks a lot.

0 Likes