Tuesday, February 24, 2015

How to set Pilaster Height equal to Grade Beam depth using DynamoBIM (or how to drive an instance parameter with a type parameter in a loadable family)

Someone over at bim forum asked if there is a way to set Pilaster Depth equal to the Depth of a grade beam.
The simple answer is yes.

There are many ways to do this but the simplest way would be to change the grade beam from top justification to bottom and then just get and set parameters....

This example you will need to "get" the depth of the grade beam, which is a type parameter from a loadable family and set it to the pilaster ht, which is an instance parameter of a loadable family. How do you get a type parameter from a loadable family?
Well... take note that....

The "All elements of Family type" node selects all the Loadable Family INSTANCES and therefore you could only "get" that family's instance parameters.

The "Family Types" node selects all the loadable family TYPES and therefore you could only "get"  that family's.................TYPE......... parameters.

See the image and good luck getting and setting type and instance parameters to eachother!


Justin said...

I was trying to follow along with your post but instead of having the reference based off the Bottom of the beams, I was trying to do it off the Top.
The issue is that the "h" value is a positive number and I'm trying to push the value to the "Base Offset" of the beams. This number needs to be a negative.
How would I multiply the value of h by -1 so that the value for Base Offset is now inverted?

Marcello Sgambelluri said...

see response here


Justin said...

That's exactly what I was looking for.
I just didn't know that the Core>Scripting>Formula node existed.

I find that is my most difficult part of learning Dynamo.

Thanks for your help!