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: 

Drive Geometry with "INSTANCE_SILL_HEIGHT_PARAM" in window and door familys

3 REPLIES 3
Reply
Message 1 of 4
steiner
1362 Views, 3 Replies

Drive Geometry with "INSTANCE_SILL_HEIGHT_PARAM" in window and door familys

Hi,

I would like to drive geometry in window and door familys with the BuildInParameter "INSTANCE_SILL_HEIGHT_PARAM". Although certain "in place" parametervalues like bottom and top angle in baluster posts are accessible to drive geometry with "in place values" of each instance this does not seem to be possible for windows and doors like described above.

 

Is there any possibility to push this value in the family trough the Revit API?

Thanks in advance for your help.

Regards Jakob

3 REPLIES 3
Message 2 of 4
jeremytammik
in reply to: steiner

Dear Jakob,

 

Thank you and congratulations for bringing your question out of our private email communication out here into the public forum.

 

Are you asking whether you can set the value of that parameter on a selected family instance after it has been inserted into the BIM project?

 

If so, the answer is yes, and it is one of the first and simplest tasks that is covered right at the beginning of the tutorial material pointed to by the instructions on getting started with the Revit API:

 

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

 

Here is a snippet of sample code showing how to retrieve an element from its element id, get the parameter associated with a built-in parameter enum such as INSTANCE_SILL_HEIGHT_PARAM, and set its value:

 

https://thebuildingcoder.typepad.com/blog/2019/06/accelerator-dash-pattern-fix-element-rotation-and-...

 

There are many, many more samples where that one came from.

 

You might also want to check out a tutorial specifically on setting parameters in Revit. Here is the first one that happened to come up right now:

 

https://spiderinnet.typepad.com/blog/2011/04/parameter-of-revit-api-1-builtinparameter.html

 

By the way, here is another recent interesting question that is vaguely related to yours, althopugh a bit more specific and complex:

 

https://forums.autodesk.com/t5/revit-api-forum/how-to-set-window-family-sill-height-instance-paramet...

  

Cheers,

  

Jeremy

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 4
steiner
in reply to: jeremytammik

Dear Jeremy,

 

Thank you for your quick answer and you help.

 

"Are you asking whether you can set the value of that parameter on a selected family instance after it has been inserted into the BIM project?"

 

No, I didn't express clearly what I wanted to do exactly, hope my Sketch and the following explanation will be more clear:

 

Each instance of a window family adoptes a different value following the value entered in the window properties parameter "Sill Heigt". This value for each instance seems to be stored in the internal parameter "INSTANCE_SILL_HEIGHT_PARAM". My goal is to acces this value in the window family and to drive geometry with this parameter. This geometry, once inserted in the project would adopt the dimension according to value stored in "INSTANCE_SILL_HEIGHT_PARAM".

Although there seems to be no way to acces this parameter in a window family to allocate to a dimension, that is why I hoped there would be a possibility trough Revit API.

INSTANCE_SILL_HEIGHT_PARAM_3.jpg

Best regards,

Jakob

Message 4 of 4
jeremytammik
in reply to: steiner

I am certain this can be achieved.

 

There is certainly some property in the family that corresponds to the sill height, and you can determine that property value, probably manually as well as programmatically.

 

Look at The Building Coder discussion on the Family API, especially the ones that deal with creating a family definition:

 

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

 

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

 

One method that comes to mind is the AssociateElementParameterToFamilyParameter method:

 

https://www.revitapidocs.com/2020/a047ea58-0351-b419-d856-85ed23734ee8.htm

 

However, this method does have a corresponding functionality in the user interface.

 

You can hardly ever achieve anything using the Revit API that is not possible in the UI as well.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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

Post to forums  

Rail Community


Autodesk Design & Make Report