I am trying to collect the Level from all floors in my model. The Clockwork node Element.Level accomplishes almost exactly what I need except that I only want “LEVEL 1”, “LEVEL 2”, etc.
I have made many attempts to strip away parts of the string and isolate “LEVEL X”…
-
use String.Split to break the list from Element.Level into 3 sublists: Level, Name=LE VEL X, Elevation=X (image: Watch 1)
-
use String.Remove to eliminate the first 5 characters in each sublist, thus isolating LEVEL X on line [1] (image: Watch 2)
-
use List.FilterByBoolMask to filter out only sublist items that contain "LEVEL " (image: Watch 3)
…even after all these steps, I still get several “Empty List” values because one of the Levels is named MEZZANINE (image: Watch 4)
I am hoping someone has a simple solution? Here are 4 workarounds that might work:
-
edit the Element.Level Python script from the Clockwork node to only collect “LEVEL X”
-
after the String.Split step, break each sublist into its own unique list OR somehow only extract line [1]
-
feed more than one string into the “searchfor” port of the String.Contains node ("FLOOR " and “MEZZANINE”) to ultimately filter TWO criteria using List.FilterByBoolMask