Text Position Based on User Input List

Started by ToninoS, September 21, 2020, 10:49:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ToninoS

Hi all,
Hope you are well!  I wanted to be able to have text line up dependant upon where the shape it is in was placed. The below is how i did it but i was wondering if i could learn from anyone a more efficient way of doing it?

1: i defined some shape variable data as "Text_Position" with 1;2;3;4 as the choices
2: in the PinX for the sub shape text i put in:
        =IF(Sheet.5!Prop.Text_Position=1,Sheet.5!Width*0.4996,IF(Sheet.5!Prop.Text_Position=2,Sheet.5!Width*1.5694,IF(Sheet.5!Prop.Text_Position=3,Sheet.5!Width*0.4786,-0.7464)))
3: in the PinY i put in:
       =IF(Sheet.5!Prop.Text_Position=1,4.7332 mm,IF(Sheet.5!Prop.Text_Position=2,1.4668 mm,IF(Sheet.5!Prop.Text_Position=3,-1.5332 mm,1.4332 mm)))

This does work and i can choose 1 through 4 and the text moves about... of course i did not write the last if statement for choosing "4" so anything other than 1,2 or 3 will possition it as 4 is intended to do.

Any advice if i could have done this better or if i did it as i should have is appreciated.
Cheers
Tonino

vojo

need to use guards around those pinx / piny functions or a setatref function in pinx / piny  and use user cells to calculate final pinx / piny.

Recently, I created a bug  doing what you are trying to do.  Unfortunately, it corrupted many pages of the drawing and
Undo does not undo the bug.  I had to delete pages and recreate the drawing on the page of interest.  It was a mess!!!