I’ve been looking with Google’s help for any example of a Dynamic Component checking input values for ‘reasonableness’. I haven’t found any, using variations of ‘sketchup dynamic component validate input’ as the search term (without the quotes).
Is this possible? I haven’t found any examples in the tutorials in the 3D Warehouse, or in any of several DCs I’ve downloaded. I know I could use a fixed drop down list, but the range of possible values is rather large, and not really confined to particular values - I just want the input to be between MinValue and MaxValue.
I feel it ought to be possible using some combination of a Custom attribute for the original input, the IF function, and the CURRENT function (something like 'IF the CURRENT value of TextInputBox is LESS THAN MinValue, SET LenX = MinValue).
But in my early efforts, I get Circular Reference or just plain syntax errors.
Am I on roughly the right lines? Is it possible at all? If so, why can’t I find any examples?
Hoping for help on this. Thanks in advance for any suggestions.
A follow up question: is it possible to reorder the Component Options fields? I’d like to add a read-only display of the height actually used, to show how the validation rule has used min or max values, but at the moment the LenZ field displays first.
Again, I’m away from my computer, so this is my best recollection - NOT verified!
Component Options display alphabetically - by their underlying attribute name - NOT their displayed name. So you can (at times painstakingly) rename your attributes so that they will show up alphabetically in Component Options. Then, in the user input options for each attribute, you can set what name you want displayed - which doesn’t have to be alphabetical.
Thank you. That works fine for custom variables, but the built in ones always come first, it seems. However, I can add a Custom variable UsedHeight = LenZ and display that, in order as you say, to show when a Max or min value has been used instead of user’s original input.