Aspose.Diagram.Examples.CSharp.Working_with_Masters.GetMasterbyID.Run C# (CSharp) Method

Run() public static method

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

            // Call the diagram constructor to load diagram from a VDX file
            Diagram diagram = new Diagram(dataDir + "RetrieveMasterInfo.vdx");

            // Set master id
            int masterid = 2;
            // Get master object by id
            Master master = diagram.Masters.GetMaster(masterid);

            Console.WriteLine("Master ID : " + master.ID);
            Console.WriteLine("Master Name : " + master.Name);
            Console.WriteLine("Master Name : " + master.UniqueID);
            // ExEnd:GetMasterbyID
        }
    }
GetMasterbyID