- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to build a parametric model as a template. I am trying to determine the length of a variable which is unit less. I am not trying to find the actual physical length but more the variable's character length, much like you would do using the len(string) function is say python. Ex: myVarOne = 123, len = 3, myVarOne = 1234, len = 4 etc. So based on that I am trying to set another variable which has a unit. But currently it doesn't seem like there is a way to have a string and get the length.
Example would be something like this
myVarOne = 123
myVarTwo =
if len(myVarOne) <=3 then 70
if (len(myVarOne) > 4 then 40
if(len(myVarOne) = 4 then 55
Solved! Go to Solution.