Author Topic: Configure the Number of Connection Points in ShapeSheet  (Read 731 times)

0 Members and 1 Guest are viewing this topic.

vzukanov

  • Newbie
  • *
  • Posts: 2
Configure the Number of Connection Points in ShapeSheet
« on: November 18, 2013, 07:50:55 AM »
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):

Code: [Select]
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?

« Last Edit: November 21, 2013, 05:34:28 AM by Visio Guy »

Get Visio Guy's new book!


Jumpy

  • Hero Member
  • *****
  • Posts: 1010
Re: Configure the Number of Connection Points in ShapeSheet
« Reply #1 on: November 18, 2013, 08:28:36 AM »
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.
« Last Edit: November 21, 2013, 05:34:34 AM by Visio Guy »

Visit the Visio Guy web site at www.visguy.com for hundreds more articles on Visio!


vojo

  • Hero Member
  • *****
  • Posts: 786
Re: Configure the Number of Connection Points in ShapeSheet
« Reply #2 on: November 18, 2013, 08:30:08 AM »
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
« Last Edit: November 21, 2013, 05:34:39 AM by Visio Guy »

vojo

  • Hero Member
  • *****
  • Posts: 786
Re: Configure the Number of Connection Points in ShapeSheet
« Reply #3 on: November 18, 2013, 08:30:58 AM »
is snap target will hide ALL connection points
« Last Edit: November 21, 2013, 05:34:44 AM by Visio Guy »


vzukanov

  • Newbie
  • *
  • Posts: 2
Re: Configure the number of connection points (ShapeSheet)
« Reply #4 on: November 18, 2013, 10:51:28 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1507
  • Ideas Visio-lized into solutions
Re: Configure the Number of Connection Points in ShapeSheet
« Reply #5 on: November 18, 2013, 12: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!!!
« Last Edit: November 21, 2013, 05:34:54 AM by Visio Guy »


Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1384
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Configure the Number of Connection Points in ShapeSheet
« Reply #6 on: November 21, 2013, 05: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
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my new Visio Book! Using Microsoft Visio 2010