Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: richtofen on August 20, 2017, 07:02:05 PM

Title: Shapesheet Data not Applying (FillForegnd)
Post by: richtofen on August 20, 2017, 07:02:05 PM
I'm trying to apply background to a container after it's dropped.
The color value appears as coded in the shapesheet, but it doesn't show up in the diagram
If I make a change (for example, change the pattern using the fill menu, and apply), then the color works, as it appears on the shapesheet.
If I manually change the values in the shapesheet, again, the color doesn't update on the diagram until I press 'apply' on the fill menu.
Any ideas?

Set cont = Application.ActivePage.DropContainer(vsoDoc1.Masters.ItemU("Container 1"), Application.ActiveWindow.Selection)
cont.Cells("FillForegnd").FormulaForceU = 4


I'm on Visio 2010, VBA 14.0
Title: Re: Shapesheet Data not Applying (FillForegnd)
Post by: Yacine on August 21, 2017, 07:54:13 AM
When using the UI, the shape and its subshapes get modified. Modifying the shapesheet of the shape, will not modify automatically the properties of the subshapes.
You need to iterate over the subshapes and modify their properties individually.
Title: Re: Shapesheet Data not Applying (FillForegnd)
Post by: wapperdude on August 21, 2017, 01:56:23 PM
Adding to Yacine...
When you build your grouped shape, if you know that you want the fill colors to match, you can edit shapesheet of each sub shape and enter a formula to match parent shape fill.  For example, if parent is sheet.ppp, then in the subshape's shapesheet, find the Fillforegnd cell and add sheet.ppp!Fillforegnd.

Wapperdude