Free Support Forum - aspose.com

For a LineFormatEx object how can i assign showlines as true

Hello,

Previously we used to Export to PPT 2003. Now we are upgrading it to 2007 PPTX.

For a LineFormatEx object how can we set showlines as true.

Is there any property similar to this in the new format.

Awaiting your reply,

Koundinya P

Hi Koundinya P,


Thanks for your interest in Aspose.Slides.

I have observed the requirements shared by you. Please use the following sample code to serve the purpose for enabling or disabling the lines. Please share, if I may help you further in this regard.

public static void generateAutoShape()
{
PresentationEx pres = new PresentationEx();
SlideEx slide = pres.Slides[0];
int id=slide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 20, 30, 300, 250);
AutoShapeEx ashp = (AutoShapeEx)slide.Shapes[id];
ashp.FillFormat.FillType = FillTypeEx.NoFill;

LineFormatEx lineFormat = ashp.LineFormat;
//To hide line
lineFormat.FillFormat.FillType = FillTypeEx.NoFill;

//To Show line
lineFormat.FillFormat.FillType = FillTypeEx.Solid;
lineFormat.FillFormat.SolidFillColor.Color = Color.Red;
lineFormat.Width = 3f;
lineFormat.DashStyle = LineDashStyleEx.DashDot;

pres.Save(“D:\Aspose Data\GeneratedPres.pptx”, Aspose.Slides.Export.SaveFormat.Pptx);
}


Many Thanks,