Aspose.Diagram.Examples.CSharp.Working_with_Layers.RetrieveAllLayers.Run C# (CSharp) Method

Run() public static method

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

            // Load source Visio diagram
            Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx");
            // Get Visio page
            Aspose.Diagram.Page page = diagram.Pages.GetPage("Page-1");

            // Iterate through the layers
            foreach (Layer layer in page.PageSheet.Layers)
            {
                Console.WriteLine("Name: " + layer.Name.Value);
                Console.WriteLine("Visibility: " + layer.Visible.Value);
                Console.WriteLine("Status: " + layer.Status.Value);
            }
            // ExEnd:RetrieveAllLayers
        }
    }
RetrieveAllLayers