Text Convert case

So, I know there are many topics to my question but trying to work this out and I’m on the last option and just can’t figure it out. attached is the script. There might be a better way, but this is the path I chose. trying to convert a text string to a number Sentence Case = 3, Lower case = 1 etc..
Nv Case Change.dyn (47.8 KB)

It’s difficult to understand exactly what you’re after and what the problem is with just a description and a file. Can you share a screenshot with your graph in action to better explain what you need help with? Usually we can get you sorted out with just a good image and a detailed explanation.

1 Like

Sorry Nick you are correct. here is the image of my issue. I know I can just manually change the Number from 0 to 3 but would like it to auto change depending on the option I choose in Data Shapes.

Instead of fighting the custom UI, why not utilizes the Custom Dropdown Selector and Dynamo Player?


That dropdown node works just fine as an input in Player, so you can simplify the effort by a SIGNIFICANT amount and still make headway with the customization.

2 Likes

yea I get that (by the way your way is pretty slick) but as I said the office is using data shapes in a revit toolbar not using dynamo player.

Just to answer your initial question: you need to assign the matching integer values to your radio buttons and have that selection feed the index input rather than a manual value. Same idea as what Jacob is proposing. You have the user-facing key, now you need a returned value.

Nick Is his what you are talking about? If it was it worked!

1 Like

Yup! The Keys and Values inputs should sound familiar if you’ve used dictionaries before. Data-Shapes inputs create a dictionary of keys to be selected and values to be returned (based on the respective selection). Think of it as “what you want to see” and “what you want to use” when creating custom inputs. The custom dropdown node does the same thing.

1 Like

As always NIck! you Da Man!!! Thank you very much