Dynamic Connectors in Groups

Started by Nihimon, January 20, 2010, 07:58:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nihimon

Hi,

I'm trying to create a shape with a pre-built connector in it.  I create a rectangle and a connector and group them.  One end of the connector will be glued to a fixed position on the rectangle.  The other end of the connector will be glued to a connection point that will move corresponding to a control on the group shape.

I create a Rectangle, with a Connection Point at Width*0.5, Height*0.  I then create a Dynamic Connector, with the beginning glued to this Connection Point.  I then group the Rectangle and the Dynamic Connector together.  Now, I add a Control to the Group Shape, with a Connection Point linked to it.  I then glue the end of the Dynamic Connector to the Group Shape's Connection Point.

My problem is that, when I move the Group Shape's Control around (thereby moving the Group Shape's Connection Point) I see the end points of my Dynamic Connector at the appropriate spots, but the line between them isn't right.  I've attached a small picture to illustrate the problem.  On the left, you can see the Dynamic Connector selected, and see where its end points are.  On the right, you can see how it looks when it's not selected.

Can anyone help me figure out how to make Visio redraw the line appropriately when its end points are moved?

Thanks,
Matt

wapperdude

At the risk of over-simplying, it looks like you're trying to re-create the "callout" shapes that are standard with any version of Visio.  These are found at File > Shapes > Visio Extras > Callouts.

Nonetheless, you can group a rectangle and a dynamic connector and use a control point to move the connector end.  But, I'm not sure the results are satisfactory.  See attached.

Wapperdude

Visio 2019 Pro

Nihimon

Actually, I'm trying to create an Entity-Relation shape that has a number of connectors pre-attached.  I already figured out how to make the connector only show up if the control it's attached to is out of its "home" position.  Now, I just need to make the line between the control and the fixed end point draw correctly.

This is more of an excercise for me to learn Visio than anything else.

Nihimon

Having looked at the callouts, it's not quite the same thing.  If I use a line in my shape, it works correctly, but that's because the Geometry for the line is all relative to the end points.  However, on a dynamic connector, the Geometry is apparently updated via some magic inside Visio, but the magic stops when the connector is grouped with other shapes.  I'd really like to know how to turn the magic back on, so that it draws as it would outside the group.

Jumpy

Look in the ShapeSheet of the group. In the ObjType cell (misc. section).
There you can control the behavior of a shape in automatic routing and layout.

If you add 8 to the number you have currently in it, it will tell Visio that it should activate routing inside the group, too.

Nihimon

The ObjType cell for the group is already set to 9, which includes the "8" bit.

At any rate, I went ahead and tried "adding 8" to the 9 already in the field, and that didn't work either.

Jumpy

Sorry it didn't work. Were only guesses on my part from something I read in the Visio Developers Survival Pack book and which I didn't try out for myself.

Maybe it must be 10? 2 is the normal for routable.
Or maybe I didn't understand the theory correctly, so perhaps the shape inside the group needs the added 8?

wapperdude

Perhaps I'm missing something here.  I re-worked the grouped shape to include multiple dynamic connectors.

This was created by
1>  Drawing main shape and converting to group
2>  Edit main shapesheet and lock calculation of width/height.
3>  Draw dynamic connector and add to group
4>  Edit dynamic connector shapesheet and lock the beginning point to main shape center.
5>  Repeat 3 & 4 as desired.

Note:  dynamic connectors will "blast thru" groupped shapes.
Visio 2019 Pro

Yacine

Hi Nihimon,
the problem is that the connector does not consider the group it is contained in for routing.
You have to make sure that "IN THE GROUP" the connector is connected to a sub-shape with the right connector direction.
See attached pic.
Yacine

fensterb

Hey guys, I am having the exact same issue.....The issue did not start until I had to uninstall/re-install due to some file format conflicts.

Here is my issue. I created shapes that consist of a few shapes, some connection points, and then some dynamic connectors. Those items were all grouped together. Before, I could just click the line and stretch it to connect to another item... now, the endpoint will connect, but the line seems to stay the same size..... it is driving me crazy. I Have linked to two videos... the first shows the issue... The second shows how the lines work properly if I ungroup the items.

https://vidd.me/6ax

https://vidd.me/ufk

and


Help!!!!

Yacine

Make sure that the connectors are only glued to points of the group. No external points.
To make the connector glue to an external point, use an intermediate control point.
Yacine

fensterb

#11
Thanks Yacine.... Can you be a bit more specific though... I don't quite understand.... I'll give a bit more background. I created these shapes about 4 years ago and have been using them daily with no issue... both on a windowsXp machine and this machine (this machine for about 8 months) properly. After the re-install the behavior completely changed. The "lines" are only connected to the gray box on one side (the left side). On the right side they are not connected to any glue points, not in the group or outside the group. They are just strait lines with an open endpoint.

I am not sure I understand the intermediate control point either. Being a line, it looks like it only has a right endpoint, a left endpoint, and a center. Am I missing something?

Thanks for all the help!

**Edit***

Also, when I open up your sample drawing, and I move the yellow connection point, the point moves, but the line does not.

Yacine

#12
QuoteAlso, when I open up your sample drawing, and I move the yellow connection point, the point moves, but the line does not.
That must be your machine. The shape worked as expected. The connectors follow the control points.

Would it help if we had a look at your shape? Can you upload it?
Yacine

vojo

FWIW....I use this group connector shape all the time

fensterb

Hey Guys, Thanks for the help.... I kinda do think it is my machine. I have attached a copy of one of my most simple shapes. I click once on the shape and it selects the entire group, then I click again on the line to select the line. I grab the endpoint and drag it.........the endpoint moves, but as you can see in the video the line does not extend.