I have created a script which allows me to set the street profile based on the type of surface and it’s width. There are two things that I would like to improve, these are marked by red groups in the attached script.
I am not sure whether I prefer to type out the ground floor definition by name or by number. My script requires the numbers to work with, but I would atleast like to see the names displayed alongside their width values (so the text conversion could work both ways). Is there a way to compress the replace text boxed into just one component? Basically, the conversion should be in the way it is defined by the white panels.
Additionally, I would prefer to click the value list checkbox to select all surfaces that are of a certain type (set to a green colour). I currently set a value cycle, which allows me to select just one type, but can this somehow be changed to the value list checkbox?
One more question: how do I go the other way around: from numerical input (0-4) to text name output (Pavement - Pond)? I would then use this as visual control for the width input in another panel.
E: I was about to post: Why isn’t this working the way I expected it to? — but then I saw the result I wanted in the screenshot. So never mind.
Is there a solution to bug-proofing the script in case of discontinuity of data? I have specified 10 street types, for which some are not used as inputs for this specific case (but they will be for other locations).
The problem I am running into is that the branches are selected by the value list, however, the indices no longer match up with the value list output.