Aspose.Slides.Examples.CSharp.SmartArts.ChangeSmartArtLayout.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:ChangeSmartArtLayout
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_SmartArts();

            using (Presentation presentation = new Presentation())
            {
                // Add SmartArt BasicProcess 
                ISmartArt smart = presentation.Slides[0].Shapes.AddSmartArt(10, 10, 400, 300, SmartArtLayoutType.BasicBlockList);

                // Change LayoutType to BasicProcess
                smart.Layout = SmartArtLayoutType.BasicProcess;

                // ExEnd:ChangeSmartArtLayout
                // Saving Presentation
                presentation.Save(dataDir + "ChangeSmartArtLayout_out.pptx", SaveFormat.Pptx);
            }
        }
    }
ChangeSmartArtLayout