From my C# code, I am trying alter a shape's background to highlight it in response to a given criteria. I researched all visio forums and came up with the following methods:
first method:
ArrayList sourceStream =newArrayList();ArrayList formula =newArrayList();
sourceStream.Add((short)VisSectionIndices.visSectionObject);
sourceStream.Add((short)VisRowIndices.visRowFill);
sourceStream.Add((short)VisCellIndices.visFillForegnd);
formula.Add("RGB(255,0,0)");
Array arrSourceStream = sourceStream.ToArray(typeof(short));Array arrFormula = formula.ToArray();
shape.SetFormulas(ref arrSourceStream,ref arrFormula,(short)VisGetSetArgs.visSetUniversalSyntax);
None of the methods resulted in change in the shape's color. Additional information:
1) trying to change shape's line color or pattern by changing the VisCellIndices enum gives the same result - no change
2) I am able to add custom cell properties to the shape
3) I am able to alter shape's text using the "Text" property
I am completely stuck!! any ideas?
Regards, Ilan
first method:
shape.CellsSRC[(short)VisSectionIndices.visSectionObject,(short)VisRowIndices.visRowFill,(short)VisCellIndices.visFillForegnd].FormulaU="RGB(255,0,0)";
second method:
ArrayList sourceStream =newArrayList();ArrayList formula =newArrayList();
sourceStream.Add((short)VisSectionIndices.visSectionObject);
sourceStream.Add((short)VisRowIndices.visRowFill);
sourceStream.Add((short)VisCellIndices.visFillForegnd);
formula.Add("RGB(255,0,0)");
Array arrSourceStream = sourceStream.ToArray(typeof(short));Array arrFormula = formula.ToArray();
shape.SetFormulas(ref arrSourceStream,ref arrFormula,(short)VisGetSetArgs.visSetUniversalSyntax);
1) trying to change shape's line color or pattern by changing the VisCellIndices enum gives the same result - no change
2) I am able to add custom cell properties to the shape
3) I am able to alter shape's text using the "Text" property
I am completely stuck!! any ideas?
Regards, Ilan