Visio Guy

Visio Discussions => General Visio => Topic started by: ThirdDimension on April 27, 2016, 02:28:42 PM

Title: Help hiding objects with connector points
Post by: ThirdDimension on April 27, 2016, 02:28:42 PM
Hi,

I am requesting help with hiding connection points.  Here is my situation.

I have created a simple shape containing several lines.  I have a right click menu that hides or shows lines depending on user configuration.  On one line, I have several connection points added. The problem is that when I hide the line with the connection points, the connection points are still active when I approach with a connector line.

How do I hide the attached connection points on a line?

thanks  3rd D
Title: Re: Help hiding objects with connector points
Post by: AndyW on April 27, 2016, 03:04:21 PM
The only way I have found to handle this is via code, when hiding then delete the connection points and when making visible insert the connection points. Failing that the only other option in a pure shapesheet way would be to change to outward connection points when hidden. Will still show the connection points, but you won't be able to connect to it.
Title: Re: Help hiding objects with connector points
Post by: JohnGoldsmith on April 27, 2016, 03:05:21 PM
Hi,

You can't dynamically hide connections point individually (unfortunately) but you can change their direction.  If you open the ShapeSheet you can set the Type / C cell (https://msdn.microsoft.com/en-us/library/office/ff765591.aspx) on your connection point to be outward (1).  That way, the connection point won't accept incoming connections.  It will of course accept incoming ones, meaning that you'll be able to glue it 'to' another connection point, which may or may not matter in your situation.

Best regards

John
Title: Re: Help hiding objects with connector points
Post by: JohnGoldsmith on April 27, 2016, 03:05:54 PM
Ah ha - Andy got there first :)
Title: Re: Help hiding objects with connector points
Post by: AndyW on April 27, 2016, 03:07:38 PM
Only just!
Title: Re: Help hiding objects with connector points
Post by: vojo on April 27, 2016, 03:20:09 PM
2 ways
- if a child shape, then shapesheet down where you define the handles and group selection.
  There is a cell called something like issnaptarget....false hides ...true show

- if a shape...the lookup the values in DIRY/A and DIRX/A...I think above 5 means hide the
  connector point.
Title: Re: Help hiding objects with connector points
Post by: vojo on April 27, 2016, 03:56:48 PM
I have used both...unfortunately 10 years ago or so   :D
Title: Re: Help hiding objects with connector points
Post by: AndyW on April 28, 2016, 06:48:17 AM
vojo, I think you have confused connection and control points. A control point can be hidden by setting the X or Y Behaviour to 5.
Title: Re: Help hiding objects with connector points
Post by: ThirdDimension on April 28, 2016, 05:55:34 PM
thanks Everyone,

You have confirmed my suspicion that connection points cannot be hidden.  I might give the "layer membership" approach another try

3rd D
Title: Re: Help hiding objects with connector points
Post by: vojo on April 28, 2016, 11:05:45 PM
hmmm.....I did this all the time in visio 2003 (see attach...right click)

in visio 2013, isnaptarget doesn't seem to work the same way
(interestingly enough, visio2013 decided to change some of the formulas)

Got to love those deprecated functions   >:(
Title: Re: Help hiding objects with connector points
Post by: ThirdDimension on April 29, 2016, 06:51:13 PM
HI vojo,

Your diagram works.  What is a child shape?

3rd D

Title: Re: Help hiding objects with connector points
Post by: Yacine on April 30, 2016, 08:49:46 AM
Tried it in V2013.
The connection points are not hidden, but connectors don't snap nor glue to them.
Key seems to be solely the field issnaptarget in the group properties section.

@3rd D, this works only if the connection points are in a shape, that's within a group - eg is a child shape of the group.
The setting of issnaptarget is made in the group shape.
Title: Re: Help hiding objects with connector points
Post by: vojo on May 01, 2016, 06:44:23 PM
That blade is a group shape containing something like 20 child shapes.  Group level parameters trigger "things" in the
given child shape.

For example, wider base, is a checked action at the group level....the child shape that makes up the base
uses the check/nocheck to make the base wide or thin.

As far as individual shape goes.   If the DIR/X  DIR/Y have values I believe greater than 5, the connection point is hidden.   Its been a while, but I believe it goes like this

Value = 1  ==>   show and offset to the NE
Value = 2 ==> ....
Value = 3 ==> ....

Value = 5 ==>  hide and offset to the NE
Value = 6 ==>  ...

I think max value is 10