Configure the Number of Connection Points in ShapeSheet

Started by vzukanov, November 18, 2013, 12:50:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vzukanov

Hi,
I'm trying to define a shape with variable number of inputs. I realized how to calculate the positions of the connection points, but how can I make the number of connection points configurable?

I tried to use "NonPrinting" property in the following way (for X and Y coordinates of the connection point):

Y6=IF(Prop.Input>=6,Height-6*User.InPortsYSpacing,NonPrinting)

This approach did not work.
Attached the screenshot of "Connection Points" section of the ShapeSheet.

How can I do this?


Jumpy

#1
afaik you can't hide the connection points. You can only move them to a place where you can't see them.

If the connection point is part of a subshape that's another matter. Here you could use the "Is Snap Target" (or so) property of the subshape to hide the connection points of that subshape when viewed from the grouped shape.

vojo

#2
what you want to do is the following

- Define some permanent connection point (lets say at the "origin")
- define some trigger that defines when to show the connection point  (an action button or a custom property or of or or)
- for each connection point
       x<n> = if(trigger, <value of x for this connection point>, <origin x>)
       y<n> = if(trigger, <value of y for this connection point>, <origin y>)

If you have a lot of connection points, my want to use custom props to set a number and use a given num as threshold
       props.trigger = 3
       x<2> = if (trigger <3, <true point>, <origin>)    similar for y<3>
       x<3> = if (trigger < 4, <true point>,<origin>)    similar for y<4>

Note, you can NOT add connection points on the fly without VBA....so you need to define all possibles and use triggers to show/hide

vojo

#3
is snap target will hide ALL connection points

vzukanov

Thx for all the replies.

It it too bad this option is not available - seems like a basic functionality for configurability of shapes.

Anyhow, following your suggestions I just put all the extra connection points above one of the used ones. Not elegant, but works.

wapperdude

#5
A simpler way to hide the unused connection points is simply to stack them on top of each other.  Of course, this assumes that you will have at least one visible connection point.  And it assumes that you decide how many connection points BEFORE connecting to any of them since there's no guarantee which of the stacked points will actually inherit a connector.

Just an idea.

Wapperdude

Oops.  I need to read more carefully.  This thought is a restatement of Vojo's approach.  Doh!!!
Visio 2019 Pro

Visio Guy

I have been stacking connection points for years.

Note: lower-index are "on top of" higher index connection points. So if you have a stack, connection point #1 is above #2 and will get glued to if you connect something to it.

Meanwhile a suggestion has been filed: Hide Connection Points
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010