Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: vzukanov on November 18, 2013, 12:50:55 PM

Title: Configure the Number of Connection Points in ShapeSheet
Post by: vzukanov on November 18, 2013, 12:50:55 PM
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?

Title: Re: Configure the Number of Connection Points in ShapeSheet
Post by: Jumpy on November 18, 2013, 01:28:36 PM
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.
Title: Re: Configure the Number of Connection Points in ShapeSheet
Post by: vojo on November 18, 2013, 01:30:08 PM
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
Title: Re: Configure the Number of Connection Points in ShapeSheet
Post by: vojo on November 18, 2013, 01:30:58 PM
is snap target will hide ALL connection points
Title: Re: Configure the number of connection points (ShapeSheet)
Post by: vzukanov on November 18, 2013, 03:51:28 PM
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.
Title: Re: Configure the Number of Connection Points in ShapeSheet
Post by: wapperdude on November 18, 2013, 05:01:12 PM
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!!!
Title: Re: Configure the Number of Connection Points in ShapeSheet
Post by: Visio Guy on November 21, 2013, 10:34:07 AM
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 (http://visguy.com/vgforum/index.php?topic=5213.0)