This article contains a sample script for creating a text object and replacing the text with new text.
*********
Option Explicit
Sub Main
Dim grfApp, doc, txt1 As Object
Set grfApp = CreateObject("Grapher.Application")
grfApp.Visible = True
Set doc = grfApp.Documents.Add(grfPlotDoc)
Set txt1 = doc.Shapes.AddText(3,4,"initial text")
txt1.Font.size = 24
txt1.Font.color = grfColorBlue
txt1.text = "new contents"
End Sub
Updated August 6, 2019
To run this script:
OR: