Grouped Shapes WILL NOT GLUE!!!!!!!!!!!!!!!

Started by Scott10284, May 22, 2024, 08:11:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Scott10284

I recently created a rather large smart shape, which is an assembly of grouped shaped with many features.

The overall shape has 1 connection point that I intended to glue to other connection points, but it is not working.

Further investigation suggests that visio stops gluing shapes together via connection points if your shape is over a certain number of grouped objects. My tests shows that when more than 48 objects are grouped together. visio will no longer allow you to glue that shape via connection points.

Can anyone confirm this and is there a way around it?

wapperdude

I don't recall what the limit is, but I did a grouping that had 50+ shapes.  I was able to add a connection point, and glue a connector to it and glue a 2nd connector without a connection point with Glue to shape enabled.

Need more info.
1) are you gluing connector to this shape?
2) are trying to glue it and another 2D shape.
3) are there 1D shapes (lines / connectors) between the children shapes that aren't part of your 48 count value?
4) how is the group formed?  That is, how is the top level shape defined?  There must be a tangible shape for the connection point.
Visio 2019 Pro

wapperdude

Ah. Could also glue using walking glue, and glue a 2D shape to the grouped shape.  What did not work was gluing the group shape to a 2D shape.
Visio 2019 Pro

Nikolay

#3
@Scott10284
Yes I confirm. For me, it is 49 shapes though (i.e. works up to 49 shapes inclusive, from 50 it does not)

One idea could be to simplify your shape (i.e. do not build your shape using groups, but instead just use multiple geometry sections of a single shape)
That is, use "combine" not "group" to build your shapes. That is also much more efficient from the performance point of view.

Just to clarify the issue for anyone interested:



Scott10284

So my overall shape count is just north of 50 right now. I can use the "combine" function to combine like shapes as @Nikolay suggested.

The issue I am having with doing this, is that when I combine the shapes within the overall grouping, it removes the combined shape from the group. Ungrouping everything to get this combined shape back in will break alot of functions that I have coded via the overall group's shapesheet.

Is there a way to add a shape to an existing grouping without ungrouping / regrouping with the new part added to the regrouping?

Nikolay

@Scott10284

Sure, you cna use "Open Group" from the context menu to edit the contents of a group without ungrouping.

wapperdude

For those unfamiliar with the "combining" technique, it needs to be pointed out that all "shapes" combined into a single, multiple geometry construct inherit identical formatting features.  That is, they no longer have individual, unique values for fill coloring, line style formats, etc.  For example, if one has bold, blue lines, all will have bold blue lines.  So, plan ahead when combining.  It may not be a satisfactory, global/universal solution.
Visio 2019 Pro

wapperdude

#7
I need to get a life...

Well, for those who don't want the restrictions of combining, there is a work-around.  It might be a bit tedious.  It uses code and the Cell.GlueTo connection point method.  (Edit:  BTW, forgot to mention, that the combining approach as indicated by Nikolay, does work to reduce shape count and allow manual gluing to take place.)

The process involves adding an outward connection point to the large grouped array of shapes.  In this example, there are 51 shapes.  The 51st is a large shape, converted to group.  The remaining 50 are added to this lg shape.  It has the connection point.  A small circular shape has inward connection point.  The circular shape remains stationary, the grouped shape is moved such that its connection point glues to the circle's.  Doing this manually fails.  Doing this with code works.  The tedious part is that the group shape must be moved precisely such that its connection point aligns with the circle's.

The attachment contains the shapes and the code.  The code is actually quite simple.  The shapeID's are hard coded for this proof of concept.  Also, the coordinates of the LocPins are set to coincide with the respective connection points to simplify the movement positioning.
Visio 2019 Pro

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 273 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1129KB.
Tokens: post-login.
Cache hits: 13: 0.00153s for 26,597 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]