Discussion:
Cascade fill colours in a group
(too old to reply)
Aussie Susan
2008-05-02 02:57:01 UTC
Permalink
I have a group made by selecting a couple of shapes and using the 'Shape -
Group' context menu option. Using the 'Format - Fill...' context menu dialog,
I can change the foreground colour of the group.

However, using the shapesheet 'FillForegnd' cell for the same selected
group, the "dummy" group shape value at the top is changed but the sub-shapes
are not.

I can write a VBA function that looks to see if a shape is a group and then
sets the colours for all subshapes if there are any, but I was wondering if
there is a way to tell the shape that it is to cascade all colour values from
the group level down to all subgrouped shapes?

(BTW Visio 2003).

Thanks

Susan
JuneTheSecond
2008-05-02 11:23:01 UTC
Permalink
Hi, Aussie Susan.

My idea may not elegant, but
you may need to enter in Fillforegnd cell of each child shape
in the group, for example, if the name of the group parent shape
is "Sheet.7", then "GUARD(Sheet.7!Fillforegnd)".
--
JuneTheSecond

Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
Aussie Susan
2008-05-05 02:27:01 UTC
Permalink
June,

If I understand you correctly, then I'm not missing something obvious as to
how to get this cascading to occur automagically.

The workaround I've been using is use VBA to see if the shape is a group and
then setting the shapesheet cell of all subshapes if it is. At elast it works
but at the cost of a separate function to set a cell value - not that much
but was hoping for something more 'elegant'.

Thanks

Susan
Post by JuneTheSecond
Hi, Aussie Susan.
My idea may not elegant, but
you may need to enter in Fillforegnd cell of each child shape
in the group, for example, if the name of the group parent shape
is "Sheet.7", then "GUARD(Sheet.7!Fillforegnd)".
--
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
TechAuthorAndy
2009-09-25 10:59:01 UTC
Permalink
Hi JuneThe Second,

I have a potentially stupid question on this. I'm having similar issues with
a gantt chart 'task bar' object, so thought I'd use a similar approach to
your suggestion (ie linking sub-group fills to the parent fill).

However parent references generate formula errors (if parent is a taskbar),
so I was wondering if you had any suggestions.

Here's my issue:
=Sheet.587!FillForegnd
is fine, but

=Task bar.570!Fillforegnd
generates a formula error.

I wondered if the space between task and bar was the problem, so tried
enclosing with "" -> validates the formula, but still doesn't actually work.

Cheers,


Andy
Post by JuneTheSecond
Hi, Aussie Susan.
My idea may not elegant, but
you may need to enter in Fillforegnd cell of each child shape
in the group, for example, if the name of the group parent shape
is "Sheet.7", then "GUARD(Sheet.7!Fillforegnd)".
--
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
David J Parker [MVP Visio]
2009-09-26 08:30:24 UTC
Permalink
You should use the NameID (Sheet.nn) reference, since the Name(U) can be
changed.
If the reference is to the parent of a group Master, then Visio will sort
out the NameID changes for instances since it is by reference.
Post by TechAuthorAndy
Hi JuneThe Second,
I have a potentially stupid question on this. I'm having similar issues with
a gantt chart 'task bar' object, so thought I'd use a similar approach to
your suggestion (ie linking sub-group fills to the parent fill).
However parent references generate formula errors (if parent is a taskbar),
so I was wondering if you had any suggestions.
=Sheet.587!FillForegnd
is fine, but
=Task bar.570!Fillforegnd
generates a formula error.
I wondered if the space between task and bar was the problem, so tried
enclosing with "" -> validates the formula, but still doesn't actually work.
Cheers,
Andy
Post by JuneTheSecond
Hi, Aussie Susan.
My idea may not elegant, but
you may need to enter in Fillforegnd cell of each child shape
in the group, for example, if the name of the group parent shape
is "Sheet.7", then "GUARD(Sheet.7!Fillforegnd)".
--
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
TechAuthorAndy
2009-09-28 13:12:01 UTC
Permalink
Hi David.
Many thanks for that. Funnily enough I stumbled on the same solution by
trial and error (ie referring to the parent shape's ID rather than its name
worked). Many thanks for posting your reply.
Cheers,
Andy
Post by David J Parker [MVP Visio]
You should use the NameID (Sheet.nn) reference, since the Name(U) can be
changed.
If the reference is to the parent of a group Master, then Visio will sort
out the NameID changes for instances since it is by reference.
Post by TechAuthorAndy
Hi JuneThe Second,
I have a potentially stupid question on this. I'm having similar issues with
a gantt chart 'task bar' object, so thought I'd use a similar approach to
your suggestion (ie linking sub-group fills to the parent fill).
However parent references generate formula errors (if parent is a taskbar),
so I was wondering if you had any suggestions.
=Sheet.587!FillForegnd
is fine, but
=Task bar.570!Fillforegnd
generates a formula error.
I wondered if the space between task and bar was the problem, so tried
enclosing with "" -> validates the formula, but still doesn't actually work.
Cheers,
Andy
Post by JuneTheSecond
Hi, Aussie Susan.
My idea may not elegant, but
you may need to enter in Fillforegnd cell of each child shape
in the group, for example, if the name of the group parent shape
is "Sheet.7", then "GUARD(Sheet.7!Fillforegnd)".
--
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
Paul Herber
2008-05-05 23:18:54 UTC
Permalink
On Thu, 1 May 2008 19:57:01 -0700, Aussie Susan
Post by Aussie Susan
I have a group made by selecting a couple of shapes and using the 'Shape -
Group' context menu option. Using the 'Format - Fill...' context menu dialog,
I can change the foreground colour of the group.
However, using the shapesheet 'FillForegnd' cell for the same selected
group, the "dummy" group shape value at the top is changed but the sub-shapes
are not.
I can write a VBA function that looks to see if a shape is a group and then
sets the colours for all subshapes if there are any, but I was wondering if
there is a way to tell the shape that it is to cascade all colour values from
the group level down to all subgrouped shapes?
Have a look at the format painter. I'm sure it can do exactly what you
want.
--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.electronics.sandrila.co.uk/
Aussie Susan
2008-05-06 23:44:00 UTC
Permalink
Paul,

Thanks for the suggestions, and it certainly seems to work when I do this
manually. However, then I tried to record a macro while I used the format
painter, I ended up with an empty macro.

I can't seem to find any reference to the format painter functionality in
the VBA or shapesheet help files. (Probably looking for it in all the wrong
places!)

Can you point me in the right direction as to how I can use the format
painter functionality from a shapesheet formula or VBA code?

Thanks

Susan
Post by Paul Herber
On Thu, 1 May 2008 19:57:01 -0700, Aussie Susan
Post by Aussie Susan
I have a group made by selecting a couple of shapes and using the 'Shape -
Group' context menu option. Using the 'Format - Fill...' context menu dialog,
I can change the foreground colour of the group.
However, using the shapesheet 'FillForegnd' cell for the same selected
group, the "dummy" group shape value at the top is changed but the sub-shapes
are not.
I can write a VBA function that looks to see if a shape is a group and then
sets the colours for all subshapes if there are any, but I was wondering if
there is a way to tell the shape that it is to cascade all colour values from
the group level down to all subgrouped shapes?
Have a look at the format painter. I'm sure it can do exactly what you
want.
--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.electronics.sandrila.co.uk/
Paul Herber
2008-05-07 10:12:10 UTC
Permalink
On Tue, 6 May 2008 16:44:00 -0700, Aussie Susan
Post by Aussie Susan
Paul,
Thanks for the suggestions, and it certainly seems to work when I do this
manually. However, then I tried to record a macro while I used the format
painter, I ended up with an empty macro.
I can't seem to find any reference to the format painter functionality in
the VBA or shapesheet help files. (Probably looking for it in all the wrong
places!)
Can you point me in the right direction as to how I can use the format
painter functionality from a shapesheet formula or VBA code?
Look at the DoCmd with parameter visCmdFormatPainter
--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.electronics.sandrila.co.uk/
Loading...