Author Topic: Possible to click one shape and be taken to another in the same file?  (Read 1479 times)

0 Members and 1 Guest are viewing this topic.

Dougmeister

  • Newbie
  • *
  • Posts: 2
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

  • Hero Member
  • *****
  • Posts: 1610
    • ShapeSheet™ Knowledge Base
Re: Possible to click one shape and be taken to another in the same file?
« Reply #1 on: January 21, 2022, 09:51:04 AM »
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

  • Newbie
  • *
  • Posts: 2
Re: Possible to click one shape and be taken to another in the same file?
« Reply #2 on: January 21, 2022, 04:35:34 PM »
Thanks, but it won't "set focus" to a particular shape, correct?

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4400
  • Ideas Visio-lized into solutions
Re: Possible to click one shape and be taken to another in the same file?
« Reply #3 on: January 21, 2022, 06:37:00 PM »
It can go to a specific shape if desired.  See following for more complete explanation:
https://support.microsoft.com/en-us/office/add-or-remove-a-hyperlink-in-a-visio-drawing-271fb2a8-4081-47db-a333-487315c05085
Visio 2019 Pro

Yacine

  • Hero Member
  • *****
  • Posts: 2984
Re: Possible to click one shape and be taken to another in the same file?
« Reply #4 on: January 22, 2022, 05: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.

« Last Edit: January 22, 2022, 05:57:01 AM by Yacine »
Yacine

vojo

  • Hero Member
  • *****
  • Posts: 1672
Re: Possible to click one shape and be taken to another in the same file?
« Reply #5 on: January 24, 2022, 08:21:49 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4400
  • Ideas Visio-lized into solutions
Re: Possible to click one shape and be taken to another in the same file?
« Reply #6 on: January 24, 2022, 09:14:03 PM »
@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

  • Hero Member
  • *****
  • Posts: 2984
Re: Possible to click one shape and be taken to another in the same file?
« Reply #7 on: January 25, 2022, 03:18:47 AM »
@Wapperdude, yours is much more straightforward.
Yacine

Soundstorm

  • Jr. Member
  • **
  • Posts: 15
Re: Possible to click one shape and be taken to another in the same file?
« Reply #8 on: February 13, 2022, 10:01:58 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: Possible to click one shape and be taken to another in the same file?
« Reply #9 on: February 13, 2022, 12:46:15 PM »
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 and applications for Visio -

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

Visisthebest

  • Hero Member
  • *****
  • Posts: 640
Re: Possible to click one shape and be taken to another in the same file?
« Reply #10 on: February 13, 2022, 01:05:32 PM »
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

  • Jr. Member
  • **
  • Posts: 15
Re: Possible to click one shape and be taken to another in the same file?
« Reply #11 on: February 14, 2022, 03:19:18 AM »
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

  • Hero Member
  • *****
  • Posts: 640
Re: Possible to click one shape and be taken to another in the same file?
« Reply #12 on: February 14, 2022, 05:42:06 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: Possible to click one shape and be taken to another in the same file?
« Reply #13 on: February 14, 2022, 02:50:00 PM »
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 and applications for Visio -

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