Min/Max Dims via Text Box

Correct me if, I’m wrong, but I get the impression that when setting min/max dimensions of a DC that this is only constrained when sizing is being changed via the Scale tool?

Is there currently a way to constrain sizing of a DC while allowing the user to edit via a text box?

Add an IF/THEN function to the appropriate LEN property…

1 Like

Thanks, Dave. Just to clarify, I’m assuming I would set IF/THEN where if length is greater than “measurement” then “measurement” where the measurement would be either the min or max dimension I want to set?

That seems reasonable. Basically something like this which I set up in Excel.


It returns the value of B2 unless B2 is greated than 12 in which case it just returns 12.

Dave is correct on the Spead sheet basis of attribute dialog, this incudes some prebuilt formulas

you have a largest and smallest function
you need to use the current function for scaling, If using metric, times this by 2.54 as this function returns inches.

If scaling on X axis, with lenX use, min and max values as choosen

=largest(min,smallest(max,current(“lenx”)*2.54))

where the *2.54 is only required for metric

You can assign this formula to a option dropdown with a choice of picking user input

=largest(min,smallest(max,input))

where input (or other attribute name) is a visible and editable attribute

choices.skp (19.0 KB)

1 Like

I think I understand that portion of what he was saying, but your example still relies on the Scale tool. All of my other DCs in the file are adjusted via text box and the user entering a length. I’d like to maintain that for this item as well (an end panel), but still allow for them to only be able to input dimensions that are within the min/max for the production of the panel.

For example, this panel can only be a min of 14cm x 14cm and a maximum of 120cm x 227.5cm. If they were to attempt to set a size of 10cm, I want it to revert to the minimum 14cm. Alternatively if they attempted to set a size of 250cm, I want it to revert to the maximum 227.5cm. I want all of that, ideally, to occur via their input in the text box rather swapping to the Scale tool.