Levels elevation

Hi All,

I’m encountering an issue with getting the floor elevations, and I don’t know where I went wrong in the script below

Help me pls

Thanks.

Check your inputs, and which elements have a “Level” parameter. Some may have a “Base Constraint”, “Schedule Level” or similar instead. This won’t return a level element from GetParameter, and instead get a blank string, which is why you’re getting that error on Level/Elevation.

What Hamish is saying is i think correct.
I am an MEP user, so this method works for me.

Howver, you could try the GeniusLoci Node, seems like it might be able to level of floor elements.

Looks like the value returned by the GetParameterValueByName node is returning a string, not the level element. You’ll want to get the level using the name - there are a few custom nodes for this, or you can create a dictionary from the levels in your project.

I thought the same, until i tested on mech equipment, and it actually returns the level element, not a string. Suprised me but thats why i suggested the Genius Loci node.

The different Level parameters return different types. You just need to know what type your parameter is returning so you can convert it if necessary (which it is in this case).

3 Likes