A reader asked how to fill a shape with a custom fill pattern from a fixed list in of a shape. They had no trouble with the first 25 standard fill patterns, but couldn’t figure out how to apply a custom pattern. So, I shall try to explain how this can be done …
This is an ordered list of the first 25 fill patterns have a tooltip (in English) that can be applied with the Format Shape panel:
- Transparent
- Solid
- Dark upward diagonal
- Large grid
- Large outlined diamond
- Dark downward diagonal
- Dark horizontal
- Dark vertical
- Light 20%
- Light 30%
- Dark 30%
- Dark 20%
- Dark 10%
- Dark wide horizontal
- Dark wide vertical
- Light downward diagonal
- Light upward diagonal
- Checkerboard
- Trellis
- Dark narrow horizontal
- Dark narrow vertical
- Dark narrow downward diagonal
- Dark narrow upward diagonal
- Small grid
- Small outlined diamond
I created a couple of custom fill patterns, Custom Circles and Custom Diamonds to the document, and added their names to a semi-colon list containing the standard fill patterns. This was entered into the format cell of a fixed-list Shape Data row called Fill.
="Transparent;Solid;Dark upward diagonal;Large grid;Large outlined diamond;Dark downward diagonal;Dark horizontal;Dark vertical;Light 20%;Light 30%;Dark 30%;Dark 20%;Dark 10%;Dark wide horizontal;Dark wide vertical;Light downward diagonal;Light upward diagonal;Checkerboard;Trellis;Dark narrow horizontal;Dark narrow vertical;Dark narrow downward diagonal;Dark narrow upward diagonal;Small grid;Small outlined diamond;Custom Circles;Custom Diamonds"
Then I created a User.FillIdx row with the formula:
=LOOKUP(Prop.Fill,Prop.Fill.Format)
This will get the index number of the selected fill pattern from the list. This index number is all that is required for the value in the FillPattern cell for the standard fill patterns, but the custom patterns need to be specified by name with the USE(…) function. So, the following formula will use the numeric index value for the standard fill patterns, but the name of the custom fill patterns:
=GUARD(IF(User.FillIdx<25,User.FillIdx,USE(Prop.Fill)))
This is how the relationship is setup in the ShapeSheet between the FillPattern, Prop.FIll and User.Fill rows:
This video shows the above in action:
My new book on Visualizing Processes with Microsoft Visio has launched
Back in the early 1990s, there was an application called ABC Flowcharter that was the market leader for diagramming business flowcharts, but some of the brains behind Aldus PageMaker saw an opportunity to create something smarter, and left to write the Visio product, with the stated aim to overtake ABC Flowcharter within 2 years. They…
Interactive Demographics of the European Union in Visio
I was recently contacted by a reader, Stanley M. Max (Towson University lecturer), who had started creating a Visio map of the 27 countries in the European Union in 2020, along with the demographics culled from Wikipedia. He wanted to know if the map and stats could be combined to make a more appealing presentation.…
Understanding Visio Data Graphic’s Color by Value
The desktop Visio editions, Visio Professional and Visio Plan 2, have a great way of automatically displaying data as Data Bars, Icon Sets, Text Callouts and Color by Value. The first three types of Data Graphics require sub-shapes to be inserted into each shape that they are applied to, but the last one, Color by…
Pushing Data Visualizer in Visio beyond its limits
My last post was about some of the lessons learnt when trying to push Data Visualizer to its limits, but this one has some ways of overcoming these limitations. The main lesson learnt is that DV binds the shapes within the DV container shape, CFF Data Visualizer, and controls some of the ShapeSheet cells that…
Pushing Data Visualizer in Visio to the limits!
Regular readers of my blog will know that I like to use the Data Visualizer (DV) in Visio Plan 2, but I recently tried to help a user who really decided to push it to the limits. In this scenario, there were multiple connections, but with different labels, being created between the same flowchart shapes,…
Setting Theme defaults in Visio
I was recently asked how to change the default font size and line weight in Visio, and then saw then many others are asking the same sort of question. I found one reasonable answer suggesting that you should create a new document from your required template, then edit the Styles to suit, and then save…
Leave a Reply