Adding a level to a Family type?

Hi all,

I have a small question: I have a Family type that I want to use as an input into an “FamilyInstance.ByPoint” node.
But I get an error because the familytype needs a reference level.

Can I put a “Element.SetParameterByName” in front of the node and set the Base Level to the correct level?
And if so will the output still be a FamilyInstance?
Or must I add a piece of code (like: “reference_level = L000_S-top”) to the family type string via a code block?


FamilyInstance error message:

Hello, short answer: did you try with the OOTB FamilyInstance.ByPointAndLevel node?

Maybe a stupid question…but where does OOTB stand for?
Is that a Package?

OOTB stands for “Out Of The Box”, that means that it’s included in the software core :slight_smile:

Hahahahaso it was a stupid question from me! Hahahaha.
But then…Yes it is a OOTB node!
I prefer to use only the nodes from Dynamo itself and as less custom nodes from packages as possible.

What I meant is that there is a FamilyInstance.ByPointAndLevel node with a level function included that could meet your requirements, or not… :slight_smile:

Oh…sorry! Didn’t see that last bit!
I’ll go and check it right away! Thanks for the heads-up!

No problem, you’re welcome :relaxed:

Thanks for your help!
But now I still have an error message but only at the end. I’m trying to alter the family parameters with the “Element.SetParameterByName” node and I’m using a “code block” node to set the ParameterName and the Value.
But I get the error that the “Parameterl’s storage type isn’t a string”.
I want to change the Constrains “Base Level” and “Top Level” and the “Top Offset” from the family.

Is the error telling me that I’m giving a string into the node and that’s not correct?
Or the items I wanne change can’t handle a string because the need a Level as an input?

1 Like

Sorted this one out.
Used the “Levels” node and no more errors.

Just don’t use “”. If you use them in your code block, then it’s a string. If you don’t, it will be considered as a Double or an Integer.
Using an Object.Type node can also be sometimes useful to identify the type of a Dynamo element (for instance after a GetParameterValue node, it will show the Dynamo type of the resulting items).

1 Like

Okay…thanks for clearing that up for me.
But I always thought that an Integer or a Double where numbers instead of being text?

Yes indeed, they are numbers, and if you use apostrophes (""), then it’s a string. You could instead also use Number or String nodes. If needed, there is see some more explanation to be found here:

1 Like