Protect custom stencil shapes from themes

Started by Blackhawk, July 05, 2019, 02:59:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Blackhawk

All

I am finally getting around to refreshing my custom stencils that I have been using for years.  It has been an annoyance when themes were introduced to have to shut off themes just to keep the colors and formatting of the stencils I have been using.

Now that I am getting around to cleaning them up, I would like to properly address this issue.    I would like themes to be active for a document, but whenever I drag in a shape from my stencil, I do not want it to be affected by the theme.   No matter what settings I enable on the master shape, it seems to ignore them, and I am not sure how to fix this.

I have followed a number of articles (including https://blog.bvisual.net/2016/06/10/protecting-shapes-from-themes-in-visio-2013/) but every time I drag the shape in, it re-colors it according to the theme.

Anyone have any ideas what might be going on here or how I can trace down why this is happening?


Paul Herber

The top-level shape of the group is protected, but not the sub-shapes. You need to protect each sub-shape as well.
Electronic and Electrical engineering, business and software stencils for Visio -

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

Blackhawk

Paul,

I opened the group and applied protection to them as well and the same issue results.  I kept checking for more groups just to be sure, and I was at the lowest level.  Still no difference.


The only thing I can think of is that perhaps because it came from a VSS file and not VSSX, that it is retaining something or not upgrading when saved as a VSSX.

I say this because when I create a new document and open the stencil, then enable themes, I get a dialog stating that some shapes were created in an older version without theme support.

Could this be the issue?

Blackhawk

Hmmm....additional playing around, and found that it was not the case where I get the dialog upon creating a new document and dragging in a stencil shape.   It must have been from the document I was using.

I tried also to protect Format (in addition to themes) and that also fails.

I am out of ideas.

vojo

you should check again.   usually, you have to protect the child shapes explicitly
BTW, the other way to protect is to use guard    Fillforgnd = guard(rgb(200,200,200)...no matter what is done in UI, value stays same.

wapperdude

Did some test cases as I recall there are some strange things with themes.  Duh.

Made a simple shape like the one you showed.  Upper child shape is filled with some color, lower child has white fill. Then made total of 4 variants:
1) no protection/guarding
2) theme protection at only group level
3) theme protection at group and child shapes
4) guarding at group and child shapes.

The results were: 
1) obvious...tracked with theme changes.
2) protected both group and child shapes...bit surprising, but worked.
3) ditto
4) mildly better than (1) above, but not very effective...quite surprising.

Went back and checked all the settings, and they are as initially set.  Note, as the themes were changing, I could see the shapes in the stencil change as well.

For reference:  I'm using V2019  Pro.
Visio 2019 Pro

vojo

thx wapperdude

Seems like a bug in #4 since guard is suppose to protect a cell from any UI changes
(guard shape...change a theme...shape changes....not the same behavior for pure colors ;-)  )

Blackhawk

I saw what you put together in the document.   Maybe the problem isn't the shapes, but the starting stencil.   

What my shapes are based off of is "Divided Process 2" from "Miscellaneous Flowchart Shapes" stencil.    This is where I get the problem.   It does not behave like two shapes put together into one.

wapperdude

I don't see the problem.  Here's updated file with the Divided shape from the Misc menu.  Everything still behaves as expected.
Visio 2019 Pro

Blackhawk

Ok, maybe it is the actual stencil file or my version of Visio 

I am using Visio Online Plan 2 - Desktop Program - Version 1808 (Build 10730.20348 Click to Run).

I have attached the VSSX file.

Drag each of these objects into a document and then set the theme.   In my version of Visio, all three change.

Croc

#10
I checked Theme Issue.vssx on my PC. Visio 2013.
The "Theme Protected" master, dropped onto the page, changes color when applying a theme.
Then I did the following:
- Opened for editing the master in the Document Stencil
- Opened the Protection window
- Switched to "Not checked", then returned to "Checked" 6 CheckBoxes
- Clicked OK
Now the "Theme Protected" master works fine. Applying a theme does not affect the shape color.
It seems that despite the CheckBoxes are checked, the protection was imposed with an error.

Blackhawk

If you checked 6 boxes, then you must have also checked "Group Formatting" in addition to themes.

Strange...so I followed exactly what you wrote in your steps and it did not work   >:(     I am wondering if this is a bug in my version and it is not setting the protection flags properly??

Can someone else try this on Visio 2019 or Visio 2016?   

vojo

I guess this is adhering to MS test strategy:  "no smoke, touchdown baby, ship it"

Croc


wapperdude

I was able to confirm Croc's finding with V2019 Pro.  Dragged your theme protected shape onto a drawing.  Changing themes pushed fill color changes into the shape.  Went to Developer tab > protection.  Merely clicked off and back on the theme related entries...it was not necessary to change the "format", but probably a good idea.  The shape becomes protected. 

For V2019, easily fixable.
Visio 2019 Pro