Connector Text

Started by PiP, July 25, 2018, 12:11:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PiP

Hello,

I am trying to determine the absolute location of connector text (which I think is the yellow dot / handle visible when the text box is in focus).  There seems to be something that I am not understanding.

When I place the yellow handle on a vertical connector (angle = 90) the Controls.TextPosition = -2.5mm.  When the connector is vertical but angle = -90, with the yellow handle still on the connector Controls.TextPosition = +2.5mm

When the connector is not vertical, this 'offset' seems to take a different numbers approaching zero as the connector becomes more horizontal and longer.

Seems like I am going about this in a more difficult way that what I think should be possible - is there an easy way to determine the connector text box position?

Also, is there a way to stop the text box from moving relative to the connector beginX and beginY position?

Regards,

PiP

PiP

The solution I came up with looks something like:

=FORMAT(BeginX+Controls.TextPosition-IF((Width-(EndX-BeginX))<>0,(Width-(EndX-BeginX))/2,0),"0.0")

And similar for the Y coord.

Would still like to hear from the community how to stop the text box from moving relative to say the BeginX, BeginY coords?

PiP

Yacine

Glad you found the solution to the coordinates. I had myself a look, but did not get so far as to differenciate between orthogonal and not.

For your second question, the answer is easier. the text's position (txtpinx and txtpiny) is automatically set as "setatref(controls.textposition)", replace it by "guard(controls.textpostion)" and set the XBehaviour to 2.
Yacine

vojo

A good source for exotic positioning formulas are June the 2nd shapes.  Can learn a lot from them

PiP

Thanks Yacine and Vojo, will have a go at the suggested changes asap.  Vojo, where do I look for the June 2 shapes?


PiP

Thanks again Yasine and Vojo.  Yacine, your input worked as I had wanted.  Will read link provided Vojo.

Regards

PiP