Could you attach your macro and part document?
Thanks for your help. I've just attached to the original post.
The thing is that equationmanager.add2 or add3 doesn't work. So, I had to pass the value through a dimension. In this case, a offest of Front Plane.
At the end of the macro, I tried to include also IF() into the equation and it doesn't work either, it's so frustating.