Hide/Disable Connection Points

Started by RhesusMinus, February 10, 2011, 11:39:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RhesusMinus

My shape have some connection point that should be enabled/disabled/hidden/shown, depending on the size of the shape.

Is it possible to hide/disable connection points?

THL

Jumpy

If  your CPs are in Subshapes, that are part of a group, you can somewhere define (in the ShapeSheet of the group I think, but can't remember where) wether it shall be possible to connect to the Subshapes CPs, or not. If you can't they won't be visible, too. At least in Visio2007.

vojo

two ways

if a group ....then set issnaptarget = 0

if a simple shape....on the connection row, the dir/x and dir/y values need to be 5 or higher....see doc

RhesusMinus

OOoohhh.. I feel I'm interested.. but still no luck from reading the SDK help files...

I'm using Visio 2010

THL

vojo

shape below....right click.....select "show connection points"

RhesusMinus

See attached VSD.

I've set the IsSnapTarget to FALSE, on all subshapes(Groups) that aren't visible.
But.. If I try to draw a line, and connect to some of the connection points, ALL connection point appear.
So.,. what have I done wrong?

THL

vojo

if you are trying to make 1 subshape show connection and other does not
I think you need have something like group ==> sub group 1===>subshape X
                                                          ==> sub group 2 ==> subshape y

You could put actions at the group level to play with istarget in the subgroups (one on ...one off)

I think that will work for you....I know i have done something similar at a blade level

RhesusMinus

If the connection points are a part of the group were IsSnapTarget is FALSE, they are still "connectable".
If the connection points are a part of the sub shapes of the group where IsSnapTarget is FALSE, the appear when connecting, but I'm not able to snap to them.

The manual/SDK says this about IsSnapTarget:
"Determines whether you snap to a group or to shapes within the group."
So.. doesn't this mean that connectionpoints in the group shouldn't be snapable?

But.. I'll just move the connection point to the sub shape of the group. Problem Solved I guess.

THL

vojo

one other point

if the actual graphic of all these shapes are too complex, visio does not do well in showing/connecting/etc to them

BTW....if I understand what you are after....below works.....right click whole group (all 4 shapes)

RhesusMinus

I'm not going to connect anything to the geometry of the shape, only to the connection points.
Will it be okay then?

But I must say I noticed... 500+ Kb for this single shape :)

THL

vojo

I think its for all the stencils on this page

Certainly feel free to build your own and see if its so huge (usually not for me)

Connection point is specified....not a shape point....you can arbitrarily place it.

vojo

one other point

In the connection point rows, the dir/X and dir/y can be used to show / hide connection points  (value of 5 or above...see doc)

Something like dir/x = if (show = true, 0,5)