Better Grid Function with Shape Sheet Programming

Started by mfPanter, June 13, 2013, 07:26:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mfPanter

Hi together
We create our PID with Visio. We use the settings "fix" grid with 3 mm space. I set the "strength" to max. Unfortunately Visio does not take it very exact with the snap to grid. So it often happens that the shapes are only close to the grid raster.
Is there a possibility to create a formula e.g. in the shape sheets that rounds the pinx and piny to a multiple value of 3. The idea is if I drop a shape e. g. by the coordinates 200/189 the system will round the coordinates to 201/189. With such a logic all shapes would be perfectly allocated to the grid.
Is such a solution possible and if so how?
Thank you for your help!
Greetings
MF

Jumpy

You could try a user defined cell with a formula like:

=SETF(GetRef(PinX),Round(PinX)-Modulus(Round(PinX),3))

I didn't test it, but it should work I'd guess. But it will not round the position but "cut" it, so 200 becomes 198 not the nearer 201.
But you could get that, too with a slightly more complicated formula using If-function and interpreting the result of the modulus function. But I'm too tired for that without my first cup of coffee.

hth Jumpy

mfPanter

Hi Jumpy
I tried your solution but have some problems with the formula:
=SETF(GetRef(PinX,0),Round(PinX,0)-Modulus(Round(PinX,0),3)) does not work.

The problem is in my opinion the PinX in Modulus(Round(PinX,0),3).
When I use e.g. 200 it works but it does not work wiht 200 mm. How do I get the value without unit in Visio?

Thanks for your answer(s).
MF



vojo