Optional Arguments
Many procedures, especially the methods provided by Grapher automation objects, accept a large number of arguments. Some of the arguments are required. Every required argument must be supplied or the script fails to run. Some arguments are optional. Optional arguments may be omitted and the procedure assumes a default value for the missing arguments.
For example, the Document object's PrintOut method accepts up to four arguments, all of which are optional:
plot.PrintOut(Method, Scale, hrzOverlap, vertOverlap)
Since the arguments are optional, you can skip all or some of them when calling the procedure. To print at fifty-percent scale, for example, you would supply just the Scale argument value.
These arguments must be listed in the correct position, separated by commas, as shown below:
Set grf = CreateObject("Grapher.Application")
Set plot = grf.Documents.Add
plot.PrintOut(,50)
Although only one of the four argument values is supplied in this example, the appropriate number of commas must be used to mark the positions of the missing arguments.
Grapher automation objects do not support named arguments.