Hi!

I’m relatively proficient with SU and am now dipping into dynamic components. I’ve had some success with constricting (sub-)components to certain axes of motion and I’ve done some basic onclick actions similar to opening and closing a door.

I’m really stuck with this: I’d like to contrain a subcomponent’s motion to a certain range. Like a drawer that should be able to be opened or closed but never ‘fall’ out of the cabinet or close farther than the ‘closed’ position.

I did find this in the Help section:

–

Snapping to a smallest or largest size

Place the following formula in the LenX field for a component to snap the component’s LenX to 20 inches wide when a scale operation scales the component beyond 20 inches:

LenX =SMALLEST(CURRENT(“LenX”),20)

Place the following formula in the LenX field for a component to snap the component’s LenX to 10 inches wide when a scale operation scales the component below 10 inches:

LenX =LARGEST(CURRENT(“LenX”),10)

## These formulas are useful for components that represent items that must not be smaller than or larger than a specific size.

… but I feel I need a combination of both LARGEST and SMALLEST…

Can anybody shed some light on this?

Thanks!

Andrew