7 posts • Page 1 of 1 It would be really cool if someone can
help me with the following: I drew a tube in sketchup and I
managed to hide some handles to scale (via component Attributes
- Behavior - Scale tool). So the user can only scale the tube in
one direction. No I would like the scaling to snap on a multiple
of 25. So when my tube is 100cm and I scale it to 523, the
lenght should snap to 525. When I scale the tube to 7cm, it
should snap to 25. 25cm is the shortest the tube can be. 12m is
the longest the tube can be. Does anyone now how to do this? I
hope the question is clear enough. If not, don't hesitate to ask
me more about the problem! Thank you in advance and kind regads!
The maths to do this is relatively simple - divide by your "snap
unit", round to an integer, then multiply up again by the snap
unit. But first, you need to know about the way that new values
get updated from the user interface. For this, you need the
special function "current()". Current() receives a value from
your mouse (or VCB)