How Do You Isolate Text From a String

I have created a family that needs to start at it respective levels, and end at the level above. I decided to solve this with Dynamo, using the following roadmap:

Select all family elements> find base level> set top constraint to ‘base level+1’

seems fairly simple. I’m sure this is really simple, but I can’t figure it out. I’ve got as far as isolating the base levels, and converting that list to a list of strings. I just need to isolate the “Level” information in the string in order to proceed, but I can’t seem to figure out how.

Questions:

-is there a way to set the family height to match to the level above without the use of dynamo?
-how do I isolate text from a string (keeping in mind there is text in front, and behind the text I wish to isolate), so remove wont suffice.

instead of converting the whole Level elements to a string just ask it for a name using Level.Name

1 Like

I ended up creating a small script that sets all specified family to have a top offset of 0, rather than trying to force all families to have a “top level” parameter equal to “base level + 1.” Mostly did this for the sake of time, as Element.SetParameterByName wasn’t letting me input anything in for the value when the Parameter name was ‘Top Level.’

there is also a node in archi-lab package called level above. that would have also sorted you out.