AutoMFont Object
The AutoMFont object contains the properties for text objects such as axis titles, axis labels, and plot labels.
Properties
Example
The following script demonstrates how the AutoMFont object is used.
Sub Main
'Declares GrapherApp as an object
Dim GrapherApp As Object
'Creates an instance of the Grapher Application
'object and assigns it to the variable named "GrapherApp"
Set GrapherApp = CreateObject("Grapher.Application")
'Makes Grapher visible
GrapherApp.Visible = True
'Declares Plot as an object
Dim Plot As Object
'Creates a plot document in Grapher and
'assigns it to the variable named "Plot"
Set Plot = GrapherApp.Documents.Add(grfPlotDoc)
'Declares Shapes as an object
Dim Shapes As Object
'Assigns the AutoShapes collection to the
'variable named "Shapes"
Set Shapes = Plot.Shapes
'Declare Text1 as Object
Dim Text1 as Object
'Add Text to Plot
Set Text1 = Shapes.AddText( 2,5,"This is text")
'Declares FontFormat as an object
Dim FontFormat As Object
'Assigns the font properties to the
'variable named "FontFormat"
Set FontFormat = Text1.Font
End Sub