Trying to use Nearest to get shelves to snap to position

I’m trying to get shelves to snap to position using Nearest. It seems like that should be possible?

Here is the key formula:

=NEAREST(CURRENT(“Z”),10,20,30,40,50,60,70,80,90)

and here’s how I’m using it:

And here it is failing to work:

Any help would be much appreciated!

I’ve never taken a good look at whether DC function names must be UPPER case, or will they be recognized if you use lower case (or MixEd case). But you might want to look into it. But on general principles, I wouldn’t name your custom attribute (nearest) the same as ANY case variation of ANY DC function name (NEAREST)

2 Likes

Have you tried just putting your formula in the Position Z field? I set up a quick component doing that and it works just fine for me.

1 Like

‘Current’ returns inches, you need to multiply with 2.54
It is a bug

2 Likes

Thanks sjdorst - noted!

I’ve done that - in combination with the Mike’s tip below it is now working. Much appreciated.

Nice one Mike - now all working. Very chuffed. Thank you.

1 Like