Author Topic: Switching background color when Clicking - Visio 2016  (Read 221 times)

0 Members and 1 Guest are viewing this topic.

BillyBoy

  • Newbie
  • *
  • Posts: 5
Switching background color when Clicking - Visio 2016
« on: August 27, 2018, 04:33:59 PM »
Hello,

My aim is to switch the background color of several shapes by clicking on another shape. Then when clicking again, every shape comes back to the default color.
Knowing that I use Visio 2016 (and being a beginner with this software), is there a way to manage this task by using the Events or Actions section and then avoiding VBA/JavaScript?
If programming seems to be the most efficient option, I'll go for it.

If the topic has already been mentioned and solved, I would be glad to get redirected to the corresponding thread.

Thank you in advance!

Nikolay

  • Hero Member
  • *****
  • Posts: 762
    • UnmanagedVisio
Re: Switching background color when Clicking - Visio 2016
« Reply #1 on: August 27, 2018, 05:43:54 PM »
The easiest option may be the code (VBA)
One problem here may be that on "click" Visio actually selects shapes. And it might be not that easy to tell Visio to trigger your code instead.
The common way is actually to use shape actions (shape right-click menu, or "smart-tag" menu) instead.

No-code ShapeSheet solution will most probably take more time and will be less flexible.
You'll need to make formulas in "dependent" shapes depend on some cell in the "trigger" shape, and then toggle the value in the cell in the trigger shape.
Note - there is also no stock "click" event for the ShapeSheet only "double-click".

Another no-code option could be the layers.
You can just duplicate the shapes with different colors on different layers and then toggle the layers.
And then control the layers either with Visio dialog or by some macro (there are a lot of examples here on that)

It looks like you are building some sort of an dashboard, or?
If it is so, do you think it will be practical in your scenario to have an interactive dashboard inside of Visio?
« Last Edit: August 27, 2018, 05:45:27 PM by Nikolay »

BillyBoy

  • Newbie
  • *
  • Posts: 5
Re: Switching background color when Clicking - Visio 2016
« Reply #2 on: August 27, 2018, 08:35:58 PM »
Hello,

Thank you for your quick answer.
Please find below further details to get a better overview:

I am currently building a process flow (about 50 shapes) with several inputs and outputs. My request is to show the link between those shapes by clicking, double clicking or even hovering the mouse pointer, nevermind.
The relationship between the elements can be displayed by changing the background color, displaying an arrow or framing the shapes. The method is really flexible, just looking for the simplest way to track the path of each deliverable.
Besides, ideally, the final result should also be available while exporting in html format.

The attached illustrations represent the idea I have in mind.

Thanks







« Last Edit: August 27, 2018, 08:57:01 PM by BillyBoy »

BillyBoy

  • Newbie
  • *
  • Posts: 5
Re: Switching background color when Clicking - Visio 2016
« Reply #3 on: August 31, 2018, 08:39:57 AM »
Hello everyone,

Any idea? I understand that the large scope doesn't help to focus on one way, but any clue is welcome.

Thank you in advance.

Nikolay

  • Hero Member
  • *****
  • Posts: 762
    • UnmanagedVisio
Re: Switching background color when Clicking - Visio 2016
« Reply #4 on: August 31, 2018, 08:45:56 AM »
I have an example of somewhat similar:
https://nbelyh.github.io/svgpublishdemo/AdvWorksOLTPSchemaVisio.html

The code is inside the document, but it is specific to my SvgExport extension (will not work with bare Visio):
http://unmanagedvisio.com/products/svg-publish/html-export-demo/

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3280
  • Ideas Visio-lized into solutions
Re: Switching background color when Clicking - Visio 2016
« Reply #5 on: August 31, 2018, 09:49:18 AM »
Perhaps something like this?  http://visguy.com/vgforum/index.php?topic=6373.0
It could be adaptable...

Wapperdude
Visio 2007 Std

BillyBoy

  • Newbie
  • *
  • Posts: 5
Re: Switching background color when Clicking - Visio 2016
« Reply #6 on: September 04, 2018, 07:05:23 PM »
Thank you for your answers.

Nikolay's link represents exactly what I would like to do.
Hence, could someone explain me what means "specific to my SvgExport extension (will not work with bare Visio)" ?