designing visio stencils and templates that support themes

Started by peter.ring, February 02, 2018, 12:02:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peter.ring

The following is more or less a duplicate of a Microsoft Community post https://answers.microsoft.com/en-us/msoffice/forum/msoffice_visio-mso_other-mso_2016/visio-custom-theme-colors/830f694e-f2bd-4e16-bd11-88c8aac7a02f:

I'd like to develop stencils and templates that adheres to the corporate styleguide for my colleagues. When developing stencils and templates, how do I make new masters themable and compatible with Microsoft supplied stencils and templates?

As far as I can tell, to do this, I need an answer to this questions:


  • How will each color in a built-in or custom color theme affect existing and new shapes and connectors?

I get confused when creating a new color theme from one of the built-in themes immediately changes Line and Fill color for document masters and shapes. Especially the way Dynamic Connector line color changes.

To reproduce:

  • Create a new Visio document from a template with Basic Shapes, for example a Basic Diagram
  • Drag a few masters from the stencil to the page, and add a connector.
  • Observe that shape and connector Line color is Accent1, shape Fill color is also Accent1. In the Office theme, Accent1 is a dark blue
  • Apply the Simple theme, Variant 1. Observe that shape and connector Line color is Black, Fill color is White.
  • With Simple, Variant 1 theme selected, create new theme colors. Don't actually change anything in the New Theme Colors dialog, just click OK.
  • Observe that shape Fill color is still White, but Line color is now Accent1, and connector Line color is something I can't quite identify, maybe a dark shade of Accent1.

For even more dynamic fun, try using Basic Flowchart Shapes and the Linear theme.

What is the logic behind this? Is there a predictable pattern to this?

regards
Peter Ring

peter.ring

A little progress report. I'm using way too much time on this, and hopefully will save some time for other poor souls.

In addition to all the good stuff from the resident Visio gurus, I found a nice survey of the Visio file format at Library of Congress: https://www.loc.gov/preservation/digital/formats/fdd/fdd000021.shtml. These guys welcome comments if you have something to correct or add.

I can probably do most of what I want by editing Visio package content XML files. XML schema are very helpful when you you do this.

The various Visio XML schema are documented to some degree in various places; curiously, the most complete that I found was about the SharePoint Visio Graphics Service https://msdn.microsoft.com/en-us/library/hh645006.aspx. The namespace and targetNamespace URIs are somewhat of a mess; I'm not quite sure whether "http://schemas.microsoft.com/office/visio/2012/main" or "http://schemas.microsoft.com/office/visio/2011/1/core" are the most recent, and I can't find VisioSchema15.xsd or VisioSchema15-2012-06-05.xsd for download.

For some of the theme elements (those in the namespace http://schemas.microsoft.com/office/visio/2012/theme), I can't find a complete XML schema, only piecemeal stuff.

I still find parts of the theme schema documentation completely opaque. Even deliberately opaque; how about:

QuoteMultiformat is specified by the value of the monotone attribute of a CT_VariationClrScheme child element, specified by the VariationColorIndex Cell_Type element of a shape, of a CT_VariationClrSchemeLst child element of an ext child element as specified by the CT_OfficeArtExtension type (specified in [ISO/IEC29500-1:2011] section 20.1.2.2.14) of an extLst child element as specified by the CT_OfficeArtExtensionList type (specified in [ISO/IEC29500-1:2011] section 20.1.2.2.15) of a CT_ColorScheme type (specified in [ISO/IEC29500-1:2011] section 20.1.6.2) of a themeElements child element as specified by the CT_BaseStyles type (specified in [ISO/IEC29500-1:2011] section 20.1.6.10) of a CT_OfficeStyleSheet element in a Theme_XML_Part.

Neither "multiformat" nor "monotone" is described further anywhere AFAIK. Like absolutely nowhere else. What does "monotone" do?

And I still wonder how a theme controls connector color.

Right now, I have a lot of sympathy for a rather defensive attitude towards themes for stencil and template developers.