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:
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…
Taking Visio Actions Rows to the limit
I recently (re-)discovered that there is a limit to the number of Actions section rows that will be evaluated for display on the right mouse menu of a Visio shape. I have not hit a limit (yet) for the number of rows that can be added to the Actions section … so why is there…
A Multi-Time Zone Clock for Visio
I wrote a post about making a clock face in Visio fifteen years ago, but a reader recently asked about displaying multiple time zones. Well, I have previously written about time zones in Visio, so I accepted the challenge to improve upon my earlier work. (more…)
Update any Visio ShapeSheet cell with External Data
When Microsoft introduced a new way of linking external data to Visio shapes in 2007, I initially bemoaned the inability to update anything but Shape Data row values, unlike the old database add-on that I had been using for 10 years. The new method, though, has many advantages over the old way, not least that…
Leave a Reply