glueing two shapes to each other - glue control handle

Started by miless2111s, August 31, 2016, 03:16:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

miless2111s

I would like to be able to glue two shapes to each other (shape A attached to shape B) so that when shape B moves shape A is dragged around maintaining their relative position.

I can do this if I use the shapes in the Brainstorm / Legends set however it would be nice to have the whole range of shapes available.

When using the Brainstorm Legends I select the yellow (visio 2010) handle at the bottom left of shape A and drag it onto shape B.  Job done.

I can make the yellow handle appear in any shape (open the shape sheet and ask to see the control section) however this doesn't replicate the functionality of the legend shape :(

What am I missing?

Many thanks

Miles

Yacine

Haven't found the shapes you're talking about. Can you upload a file?
Yacine

miless2111s

How do I upload a file?
The shapes I refer to are under business / brainstorming legends

wapperdude

When making a post, underneath the text entry area is Attachments and other options.  Expand that.  Click the browse button.  You can then navigate on your computer, find the file, and add it.

That it.

Wapperdude
Visio 2019 Pro

miless2111s

Thanks Wapperdude, the test file should be attached here...

miless2111s

OK, an update which may or may not help....

I have copied a bunch of User Defined cells in the shape sheet of the Important (!) shape from the brainstorm legends set into the rectangle:
visConNameX
visConNameY
visConPt
visDeltaX
visDeltaY
visLocToPar

And copied the following formula into the PinX and PinY cells:
PinX =PNTX(LOCTOPAR(User.visConPt,ThePage!PageWidth,Width))+User.visDeltaX
PinY =PNTY(LOCTOPAR(User.visConPt,ThePage!PageWidth,Width))+User.visDeltaY

And now it works as long as I don't move the Glued box.  If I do that the PinX and PinY values revert to normal dimensional (x mm) values as the VisDeltaX and VisDeltaY values don't change.

When I move the Important ! shape around relative to the target rectangle the DeltaX and DeltaY values change and the PinX and PinY entries remain formulas and everything works as it should.

When I look into the cells for VisDeltaX and Y they are just values (=0.5708) but it seems that they're getting a value from somewhere.  Are they build in custom items with hidden formula or something else?  When I copy the =0.5708 from the Important shape to the rectangle shape they're coming across as dumb numbers and not changing when the rectangle is moved around.

Any ideas gratefully received! :)

Thanks

Miles

wapperdude

Looked at your 1st uploaded file.  The issue is the nature of the connection points.  Visio has 3 types:  Inward, Outward, and "Inny/Outty".  Select a shape, e.g., the "glue to shape", the select the Connection Point tool.  Hover tool over the connection point on the right side and right click.  A pop-up will appear showing the 3 connection point options.  Choose either Outward or the Inward/Outward.  Now, drag the shape to the target shape, overlapping the connection points.  The connection point should turn red indicating it's glued.  Now select target shape and move it.  It will drag the other shape around.

Wapperdude
Visio 2019 Pro

miless2111s

OK, Wapperdude, that worked to join them together in a close coupled way however as soon as I move the "glue to" away from the "target" shape that link is broken.  This is different to the behaviour of the Important shape where the link remains and the "glue to" moves around with the "target" maintaining the same special relationship set by moving the "glue to" relative to the "target".

Can we make normal shapes replicate this joined-at-a-distance behaviour?

Thanks

wapperdude

Yes.  A bit more work, but not difficult.  What is needed is a control point in each shape, i.e., the yellow handle.  You must edit each shape.  Once you make a change, this is local to this drawing only.  In fact, it is to that shape only.  So, at a minimum, you should edit the local "master" on the document stencil, not on the page.  That way, all shapes in the doc that use the master will be updated.  To  make this more universally available, you will need to save a copy of the shape to a custom  stencil.  Then, that stencil will be available when chosen and you can drag and drop from it.

The process would be to select a shape and open its shapesheet.  Mouse over the  shapesheet, right click, then choose insert section  and select the control entry.  I believe the default default entry for x, y location is width*0, height*0.  I like to nudge these off a little, to the outside of  shape, so maybe each entry gets -0.05.  This value will change soon as you move the control.  Lastly, at the end the control row, make sure it says can glue.  That's it.

HTH
Wapperdude
Visio 2019 Pro

miless2111s

Wapperdude, I'll check after dinner but from memory that's what I have been doing and it didn't work :( maybe I was missing something stupidly simple.?

wapperdude

Hmmm...

Possibly under snap / glue options, glue to shape geometry isn't selected?
Visio 2019 Pro

miless2111s

Wapperdude

Sorry for the delay in responding - the weekend got a bit busy!

I have confirmed that your "add a control line to the shape sheet" is what I have been doing and this doesn't replicate the same functionality as the "important" shape :(  I can display a control and drag it onto the target shape and the end goes red.  However it doesn't appear to DO anything - when either shape moves nothing special happens in that the red dot stays stuck to the target but nothing happens to either shape :)

I also watched the shape sheet for the "important" shape and when it is dragged onto the page it is fairly normal however as soon as you drag the control handle to the target shape and glue it a whole load (below) custom user lines appear in the shape sheet!
visConNameX
visConNameY
visConPt
visDeltaX
visDeltaY
visLocToPar

Given that the "important" shape behaves as required when the new shapes don't I fear it isn't anything that is set at the page level...

wapperdude

Can you upload a Visio drawing that has two shapes...one that you modified plus the one to which you want the control handle to be glued.

Save as vise, please.

Thanks.

Wapperdude
Visio 2019 Pro

miless2111s

Quote from: wapperdude on September 05, 2016, 02:36:47 PM
Can you upload a Visio drawing that has two shapes...one that you modified plus the one to which you want the control handle to be glued.

Save as vise, please.

Thanks.

Wapperdude
I've attached the .vsd (I don't know what the VISE is - if this is incorrect can you tell me how to save as VISE?

wapperdude

Vise... :o ??? :P ::)...did that from tablet...forgot to check auto correct.

Vsd is perfect...Will take a look.
Visio 2019 Pro