Hi , I’m trying change the foreground color of attached vdx object. Objects are created using in Visio 2010 floor plane Metric shapes (desk chair). My issue is the shape’s are not getting filled. Please look in to this.
OS : NET Framework version 4 Windows 7 Professional 64 bit)
Code sample is given below
public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Shapes();
//Load diagram
//Diagram vsdDiagram = new Diagram(dataDir + “RetrieveShapeInfo.vsd”);
Diagram vdxDiagram = new Diagram(dataDir + “Group.vdx”);
//Find a particular shape and update its XForm
foreach (Aspose.Diagram.Shape shape in vdxDiagram.Pages[0].Shapes)
{
foreach (Aspose.Diagram.Prop xchild in shape.Props)
{
if (xchild.Label.Value.ToUpper() == “NAME”)
{
if (xchild.Value.Val.ToUpper() == “SEAT”)
{
shape.Fill.FillForegnd.Value = “#60D6A7”;
shape.Fill.FillPattern.Value = 1;
}
}
}
}
vdxDiagram.Save(dataDir + “Output.vdx”, SaveFileFormat.VDX);
}
Regards