Aspose.Diagram.Examples.CSharp.Working_with_Text.InsertTextShape.Run C# (CSharp) Method

Run() public static method

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

            // Create a new diagram
            Diagram diagram = new Diagram();
            // Set parameters and add text to a Visio page
            double PinX = 1, PinY = 1, Width = 1, Height = 1;                  
            diagram.Pages[0].AddText(PinX, PinY, Width, Height, "Test text");
            // Save diagram 
            diagram.Save(dataDir + "InsertTextShape_out.vsdx", SaveFileFormat.VSDX);
            // ExEnd:InsertTextShape
        }
    }
InsertTextShape