Aspose.OCR.Examples.CSharp.FormattingAndManipulatingOMR.DetectUsingElements.Run C# (CSharp) Method

Run() public static method

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

            // Load template file
            OmrTemplate template = OmrTemplate.Load(dataDir + "questions.amr");

            // Iterate over the pages in template
            foreach (OmrPage page in template.Pages)
            {
                // Get elements of each page
                OmrElementsCollection collection = page.Elements;
                // Iterate over the element collection
                foreach (Object obj in collection)
                {
                    // Display element name
                    Console.WriteLine(obj.GetType().ToString());
                }
            }
            // ExEnd:DetectUsingElements
        }
    }
DetectUsingElements