Author Topic: Position IP Address on connector at correct position always  (Read 6360 times)

0 Members and 1 Guest are viewing this topic.

Jarrod

  • Newbie
  • *
  • Posts: 7
Position IP Address on connector at correct position always
« on: October 29, 2010, 07:57:41 AM »
In a blatant attempt to start increasing my "rank" away from newbie, I thought I would post a shapesheet config I have found very useful.

I generally have (on my layer 3 network diagrams) networks and machines, with a connectors between them. The networks have text like "192.0.2.0/24" and connectors have text like ".1". I have found the following shapesheet settings almost always put the ".1" exactly where I want it (right beside the machine, not crossing the line, not on the machine).

Text Transform:
TxtWidth: 8mm
TxtHeight: 3.5mm
TxtAngle: 0 deg
TxtPinX: GUARD(Width)
TxtPinY: GUARD(0)
TxtLocPinX: GUARD(IF(BeginX>EndX,0,TxtWidth))
TxtLocPinY: GUARD(IF(BeginY=EndY,
               IF(Height<0,
                 TxtHeight-0.25mm,
                 -TxtHeight/2
               ),
               IF(BeginY<EndY,
                     IF(EndY-BeginY<4mm,
                           TxtHeight/2,
                           BeginY-Endy+TxtHeight
                     ),
                     IF(BeginY-EndY<4mm,
                           TxtHeight/2,
                           BeginY-EndY
                     )
               )
             ))


Character:
Size0: 8 pt

I also set the text box margins to all zero's.

I always draw the connector from the network to the machine.

The connectors are right-angle connectors. It tends to all fall apart if there are two or more corners.

vojo

  • Hero Member
  • *****
  • Posts: 1676
Re: Position IP Address on connector at correct position always
« Reply #1 on: October 29, 2010, 09:48:01 AM »
Well for grins....consider this

User.scale = width / <predefined or starting width>     aka something like user.scale = width / 30mm
Char = 8pt * user.scale

This will automatically size the font to the line (longer the line, bigger the font)

Can use user.scale to move the text block away from line for larger fonts.

Variations could be on line thickness or class of connection or or or

aledlund

  • Hero Member
  • *****
  • Posts: 1412