A list of errors sometimes seen with Grapher automation is provided below. Click the error message you're seeing to view information about resolving the error.
- "ActiveX Automation: no such property or method"
- "ActiveX Automation: no such named parameter"
- "ActiveX Automation: Server Could Not Be Found"
- "ActiveX Automation: Server Cannot Create Object"
- "Unable to open <file path>"
"ActiveX Automation: no such property or method" or "ActiveX Automation: no such named parameter"
This error is usually caused by a typo in one of the properties or method in the line indicated by the error. For example, this line would generate that error:
Wks.Cell("C1").Copy
This is because there is a typo in the method. The method "Cell" should be "Cells", as seen in the WksRange object properties and methods.
If there are no typos in the line, this error could also be caused by using new properties or methods with an older version of Grapher. For example, this line would generate that error when run in Grapher 12:
Plot1.Shapes.AddPiperGraph("C:\Program Files\Golden Software\Grapher 14\Samples\piper.dat",1,2,3,4,5,6)
This is because the AddPiperGraph method for the Plot object was added in Grapher 13. There is no such property or method in Grapher 12 (or prior).
If you are certain the line doesn't contain typos and is supported by the version of Grapher you are using, please contact us and send a simplified script that can be run in Scripter that exemplifies the problem.
"ActiveX Automation: Server Could Not Be Found" or "ActiveX Automation: Server Cannot Create Object"
The (10096) ActiveX Automation: server could not be found error and the ActiveX Automation: server cannot create object error typically occur when Grapher and/or Scripter are not properly registered on the computer. When the programs are not registered properly on the computer, it is usually an indication that the programs have not been run interactively, that lack of user permissions are preventing the proper registry items from being created, that multiple versions of Grapher are installed on the computer and are interfering with registry item creation, or that Grapher was installed improperly to a network location.
First, be sure that Grapher was installed either directly on the workstation it is being called from, or from the workstation to a network location. If it was installed directly on the network server, it cannot be called via automation from a workstation because the necessary registry items are not created on the workstation. If this is the case, you will need to talk to your IT personnel to get Grapher installed on your local workstation so you can call it via automation.
Second, check to be sure Grapher was opened prior to trying to access it via automation. Grapher must be opened interactively at least once in administrator mode prior to calling it via a script. Please try these steps:
- Right-click the Grapher icon or EXE file.
- Click Run as administrator.
- Close Grapher.
- Right-click the Scripter icon or EXE file.
- Click Run as administrator.
- Close Scripter.
- Then try running the script.
If you still get the error, please make sure there is only one version of Grapher installed on the computer, then repair the installation. To do this:
- Log on to the computer as an administrator.
- If Grapher or Scripter is open, close the program.
- Navigate to the Windows Control Panel and click Uninstall a program.
- In the Uninstall or change a program window, uninstall any other older versions of Grapher, including the demo versions, that are installed on the computer (if any). If no other version of Grapher is installed on the computer, skip this step.
- Repair the current Grapher installation by selecting it, clicking Change, selecting Repair and clicking Next. The installer will run the repair.
- When the installer is finished, check the option to run Grapher now and click Finish.
- After Grapher opens, close the program.
- Try running the script now.
If you still get the message, you can try manually registering Grapher before attempting to run the script. To do this:
- Close Scripter and Grapher.
- Click the Windows Start button.
- In the search box (which is also the Run command), enter the path to the Grapher.exe file in quotes followed by /register. For example: "C:\Program Files\Golden Software\Grapher 14\Grapher.exe" /register. Be sure to include the quotation marks, and be sure the path to Grapher.exe goes to wherever Grapher is installed, if it was not installed to the default directory.
- Press ENTER on the keyboard. If the command is successful, it will appear as if nothing happened.
- Now re-run Grapher and Scripter as administrator. Right-click the Grapher icon or EXE file.
- Click Run as administrator.
- Close Grapher.
- Right-click the Scripter icon or EXE file.
- Click Run as administrator.
- Close Scripter.
- Try running the script now.
If both Grapher and Scripter (or whatever program you are using to call Grapher) have been run as administrator and you still get the error, you can try turning the UAC (User Account Control) off via the Control Panel | User Accounts. You will need to reboot after UAC is turned off.
If you still get the error, please contact us with the version of Grapher you are using (File | About Grapher), your serial number or product key and the steps you have tried (above).
"Unable to open <file path>"
If you're running a script where you've defined your file name and file path as a single variable (i.e. file$ = "c:\temp\filename.dat"), make sure that the file exists in that directory, and there are no typos. Neither the name nor the path are case-sensitive.
If you're running a script where you've defined your file name and file path as two separate variables (i.e. filepath$ = "c:\temp\" and filename$ = "filename.dat"), the above could still be the issue, but another cause could be forgetting the slash at the end of the file path. If this has happened to you more than once, I suggest adding the following line to your script, after defining the file name and file path variables, but before using them:
If Right(filepath$,Len(filepath$)-(InStrRev(filepath$,"\")-1))<>"\" Then filepath$=filepath$+"\"
This checks the end of the file path for the \ character, and adds it if it doesn't find it.
Related Articles:
Comments
Please sign in to leave a comment.