Shape with connection points

Started by whirlpool1, April 24, 2012, 10:14:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

whirlpool1

Hi all,

Does anyone know how I can draw a shape (with say the rectangle tool), and then have it have connection points all the way around its perimeter (at 2.5mm intervals which will then match my grid), without having to manually add the connection points?

The second issue is that when I change the size of the rectangle, the 2.5mm connector point pitch then goes out of whack, and I need it to remain at 2.5mm connector pitch.
I always draw my shapes to the grid, so they always have a perimeter divisble by 2.5.

A master shape would be fine, that I can drag out and adjust the size of instead of drawing one with the rectangle tool.

Thanks,
Whirlpool
Build it and they will come...

aledlund

Take a look at the rack shape in the rack mounted equipment stencil. It's the same kind of problem.
al

vojo

if you want to fix a connection point....you can do this

connx = width*0+5mm
conny = height *0 +5mm

Paul Herber

You could take the rack shape mentioned by Al, and copy and paste the connection points using my utilities at:
http://www.sandrila.co.uk/visio-utilities/
from the Shape -> Copy -> Connection points
menu. You will, of course, have to set up suitable variables i.e User.HoleWidthSpacing and others.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

whirlpool1

Mmmm, I dont have the rack shapes.... :(  V2007 Std SP3.
I can see how to fix the conn points, but I really want it to add/delete conn points as the rectangle stretches.  I guess we are into a bit of VBA here?
Build it and they will come...

Jumpy

Yes. You'll need VBA to dynamically add or remove CPs.
BUT you must plan what happens to connectors, that are connected to a CP, when the CP is deleted...


Another solution without VBA could be:
If the shapes have a mximum size, you could create as many CPs as needed and place them with fiixed values and give them some logic: If shapesize<CP-Position then hide CP or place it somewhere, where out of the way.


vojo

Another none VBA approach

Create a user cell     user.scalex = width / <min or default width of shape>

Connection.x<n> = width*0 + <n/N+1 increments>*user.scalex*1mm
Connection.y<n> = height*0+<m/M+1 increments>*user.scaly*1mm

for example

User.scalex = 50mm / 30mm = 5/3
Connection.x14 = width*0 + 14/15*5/3*1mm
user.scaley = 100mm/90mm = 1.11
Connection.y14 = hieght*0 + 18/19*1.11 * 1mm

******or*********

Connection.x<n> = width * <n/N+1>
Connection.y<n> = height * <m/M+1>

Its tedious...but both work