active
Joined: Tue, Oct 12, 2010
2 Posts No Rating |
I've created a desk in the furniture family category. The desk has three parts, a center desk and two wing desks (right and left). I want to be able to insert the family into a project and edit the various sizes of the desk through the type properties...which I've been able to do just fine using type dimensions.
My problem is that I want to be able to make this desk adjust in 6" increments. I've got the min & max set where I want, I just want someone to have the ability to adjust the size...with 6" variables only. How can I round to the nearest 6"?
|
active
Joined: Wed, Oct 7, 2009
654 Posts
|
I would recommend using WWHub's method, especially if it's a type parameter. It will be much easier in the long run. However, it is possible, it's just a bit of a PITA. I have a shelving unit that needs to adjust at 6" increments from 2' to 5', and still be an instance parameter (I also wanted to keep the grips available without letting people adjust a shelf to a non-standard size). Here is the formula I ended up with, it's basically a whole bunch of nested IFs & ANDs that checks every possible size within my range (and also makes your eyes cross if you look at it too long).
if(Width < 2', 2', if(Width > 6', 6', if(and((Width > 2'), (Width < 2' 6")), 2', (if(and((Width > 2' 6"), (Width < 3')), 2' 6", (if(and((Width > 3'), (Width < 3' 6")), 3', (if(and((Width > 3' 6"), (Width < 4')), 3' 6", (if(and((Width > 4'), (Width < 4' 6")), 4', (if(and((Width > 4' 6"), (Width < 5')), 4' 6", (if(and((Width > 5'), (Width < 6')), 5', Width)))))))))))))))
Edited on: Wed, Dec 5, 2012 at 3:42:29 PM
|
active
Joined: Tue, Oct 12, 2010
2 Posts No Rating |
That's what I was looking for...something similar to a stair tread where when you grab the grip & drag it, it's still a real number. (wish I had said that first).
Thanks! I'll see if it works.
|