Possible to click one shape and be taken to another in the same file?

Started by Dougmeister, January 21, 2022, 01:46:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dougmeister

I have several Visio diagrams that are each several pages "wide".

Is it possible to click a shape in Visio file #1 and have it jump/"hyperlink" to a specific shape :

A) in a different section (but same page) of the same document?

B) on a different page of the same document?

C) in a different document?


Surrogate

Yes, you can do it!
Press Ctrl+K in this window you can set these options.

1st row for add hyperlink to another document
2nd row for add hyperlink to another page

Dougmeister

Thanks, but it won't "set focus" to a particular shape, correct?

wapperdude

Visio 2019 Pro

Yacine

I think the thing you're looking for is an off page reference.
(https://support.microsoft.com/en-us/office/continue-a-flowchart-on-a-separate-page-6e21dd6a-06d0-4111-b3dc-8a2e8ec94fb9)


Having found and inserted the shape doesn't yet satisfy your needs - namely to create your own shapes.


You could copy the relevant cells of the off-shape-ref shape to your own shape, but this could get tedious and error prone.


I tried the following and it works.


1. transform the off-page-ref shape into a group.
2. delete the geometry sections
3. delete the action rows that allow to switch between the display types
4. finally open the off-page-ref GROUP and paste in your own shape.


----


Funny idea to follow is the fact that the navigation is defined by the user cells.
OPCShapeID, that's the GUID of the shape itself
OPCDPageID is the GUID of the TARGET page
and OPCDShapeID is the TARGET shape.


Having understood this mechanism one can now manipulate the shapes to create a chain of landing targets instead of just jumping forth and back,
thus creating a kind of presentation mode.


----
One last remark: Navigation by clicking once is not possible with regular shapes. You will need to double click. (otherwise you may need to use ActiveX buttons, but that's more complicated)


PS: This work for your scenarios 1 and 2. Case #3 requires the previously mentioned hyperlinks.

Yacine

vojo

dont you want the group to have "add child shape to group on drop"
and the child shape have "add shape to parent group on drop"

Both in the behavior section

Otherwise, not sure how paste would add to group vs just plopping the image on top of the group and
not taking any group level cell personality to the image level cell personality.

wapperdude

@OP:
Attached are 2 test files.  Save them to a common directory, e.g., Documents.

File1, shape = Sheet.1, has multiple hyperlinks.  Two go to shapes within the document, and 3rd goes to the Sheet.3 shape in 2nd document.  To use, since, File1, Sheet.1 has the hyperlink examples, open that file.  Right click Sheet.1 shape and choose desired hyperlink.  File2 need not be opened. 

Note, when defining (editing) the hyperlinks, the browse buttons are very good thing to use.  Especially the 2nd one to browse for shape, as there is an entry for Zoom level. 

This should demonstrate the functionality questions that you raised.
Visio 2019 Pro

Yacine

Yacine

Soundstorm

Quote from: Yacine on January 22, 2022, 10:54:37 AM
I think the thing you're looking for is an off page reference.
(https://support.microsoft.com/en-us/office/continue-a-flowchart-on-a-separate-page-6e21dd6a-06d0-4111-b3dc-8a2e8ec94fb9)


Having found and inserted the shape doesn't yet satisfy your needs - namely to create your own shapes.


You could copy the relevant cells of the off-shape-ref shape to your own shape, but this could get tedious and error prone.


I tried the following and it works.


1. transform the off-page-ref shape into a group.
2. delete the geometry sections
3. delete the action rows that allow to switch between the display types
4. finally open the off-page-ref GROUP and paste in your own shape.


----


Funny idea to follow is the fact that the navigation is defined by the user cells.
OPCShapeID, that's the GUID of the shape itself
OPCDPageID is the GUID of the TARGET page
and OPCDShapeID is the TARGET shape.


Having understood this mechanism one can now manipulate the shapes to create a chain of landing targets instead of just jumping forth and back,
thus creating a kind of presentation mode.


----
One last remark: Navigation by clicking once is not possible with regular shapes. You will need to double click. (otherwise you may need to use ActiveX buttons, but that's more complicated)


PS: This work for your scenarios 1 and 2. Case #3 requires the previously mentioned hyperlinks.
I'm looking for a way to re-use the off-page reference, but I can't deciper the shapesheet to see how to do it.

Modifying the geometry doesn't seem to be an issue, but I want to add an extra text field. I'd like to have a reference ID and a reference text.
Additionally, I'd like to have a similar shape, but for an on-page reference.

I can do all this linking manually, but having the drag and drop feature is so handy.

Any tips on how I can do these modifications?

Thanks!

Paul Herber

The off-page reference is controlled by an add-on that is built-in to Visio. You can't change the way it works.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Visisthebest

Thank you for sharing your knowledge Paul, I didn't know now I see indeed in the shapesheet for the double-click event on the Off-page reference shape:
=RUNADDONWARGS("OPC","/CMD=2")

I would say via a CALLTHIS call on a shape (in the cell for the double-click event) with VBA in the stencil something like this could be done quite well.
Visio 2021 Professional

Soundstorm

Had a look at that, and it seems you can use the addon in your own shapes ass well.
https://techcommunity.microsoft.com/t5/microsoft-365-blog/going-off-the-page/ba-p/237251

This gave me some nice words to search for, and it seems there are many other people making the feature better. I'll look into those, maybe I can find a method on how to make this work like I want it to!

Visisthebest

Soundstorm like Paul says, if you stay within the bounds of how it already works, you can use the existing addon.

The write-your-own-code option is more complicated in terms of developing & deploying it. You will also need a code signing certificate if you want to deploy VBA code to a lot of computers.
Visio 2021 Professional

Paul Herber

I do wonder why the OPC addon doesn't give you the option to reference a shape directly, as the hyperlink data can refer to shapes. Also, even with the hyperlinks there is no option to actually select the shape referenced.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/