This article describes the difference between using the GetObject and CreateObject commands in Surfer Scripter.
When you begin a script to call Surfer, the GetObject function uses an existing open instance of Surfer and the CreateObject function opens a new Surfer application window.
For example, if you want the script to open Surfer and perform actions, use CreateObject:
Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True
If you want to open Surfer first, and then run the script and have the script use that instance of Surfer that is already open, use GetObject:
Dim SurferApp As Object Set SurferApp = GetObject(, "Surfer.Application") SurferApp.Visible = True
This is useful if you have multiple versions of Surfer installed on the computer and you want to run a script using a particular version, or if you want to perform some actions in Surfer first and then run the script and have the script apply the actions to the open file.
Updated November 12, 2018