I want to force a maximum, but how?
-
I thinks this should be possible, but I'm not sure. At the very least, I don't know how.
I want users to be able to input a value (in cm) but I want it to be limited between zero and a specific length or angle, which I am using later on for positioning a subcomponent.
Who can help me? -
I'm not sure it can be done. The first thing that came to mind was this:
Value: =smallest(max_value, =current(Value))
But this results ins a circular reference.
So then I thought you to use a second attribute:
Value: (User Input Box) Real_Value: =smallest(max_value, Value)
But this won't update the user input dialog. I don't know.
-
thanks for trying Jim... that's what I had come up with myself. But I had thought there would be a in-built function for such a thing. I had first planned to do a drop-down with pre-set values, but the client wanted to be able to set the values steplessly... difficult!! Well. Maybe I'll do a very long drop-down
-
Would something like this do the trick?
It is a workaround, and it may have some implication on how easy the DC is to configure for the end user.
-
I just read back over your posts. I should have picked up that you were looking for something other than a workaround. What did you end up doing?
-
I ended up using a solution similar to yours.
I am now, however, bumping into another problem altogether. In subcomponents, more than a few levels down, a rotation by zero results in a different location of the component than a rotation by... zero! The geometry jumps all over the place. It's bugging me -
Hmm. I don't know if it was the same issue, but I've had something similar happen.
I had no subcomponents, and I had user input controlling the RotX and RotY attributes. I didn't have the RotZ attribute enabled in DC at all.
If the user rotated the DC about the Z axis (using the rotate tool, not the DC options box), the RotZ would always jump back to 0 upon redraw.
Is this similar to what you're experiencing?
-
Hm no not exactly. But I've figured out what went wrong. Sort of.
It went like this. Everything was fine until I added a custom variable. At that moment (or some other similar actions), either the parent component or the component itself would jump to a different location.
I was baffled at first, but discovered that when I changed the user input, thus forcing SU to recalculate the entire component, everything went back into place. So it's quite irritable to work with, but the error will never occur when the user uses the component
Advertisement