What is the "SASEGObjectModel.Application.x.y" string for the new EG version 8?
Hi @PhilC,
It should be:
Set app = CreateObject("SASEGObjectModel.Application.8.1")
Not working for you? Make sure you're using the correct bitness for CSCRIPT/VBSCRIPT to match EG.
' force declaration of variables in VB Script Option Explicit Dim Application ' Create a new SAS Enterprise Guide automation session ' Change if running a different version of EG Dim egVersion egVersion = "SASEGObjectModel.Application.8.1" Set Application = WScript.CreateObject(egVersion) WScript.Echo Application.Name & ", Version: " & Application.Version Application.Quit
Saved as NewApp.vbs, then run (for 32-bit EG 8.1):
C:\>%windir%\syswow64\cscript c:\temp\newapp.vbs Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved. Enterprise Guide, Version: 8.1.0.0
Hi @PhilC,
It should be:
Set app = CreateObject("SASEGObjectModel.Application.8.1")
Not working for you? Make sure you're using the correct bitness for CSCRIPT/VBSCRIPT to match EG.
' force declaration of variables in VB Script Option Explicit Dim Application ' Create a new SAS Enterprise Guide automation session ' Change if running a different version of EG Dim egVersion egVersion = "SASEGObjectModel.Application.8.1" Set Application = WScript.CreateObject(egVersion) WScript.Echo Application.Name & ", Version: " & Application.Version Application.Quit
Saved as NewApp.vbs, then run (for 32-bit EG 8.1):
C:\>%windir%\syswow64\cscript c:\temp\newapp.vbs Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved. Enterprise Guide, Version: 8.1.0.0
Well I was having problems getting the API to work on my system with EG7, if you remember. I gave up and installed EG8; I'm sure I have the same issue that I did with EG7 (AT LEAST).
So, so much for installing the new version for a fix.
I have that outstanding SAS Tech Ticket. I'll work through them. This is was what I needed to know -- thanks
Hi @ChrisHemedinger,
I tried to use your coding to run my VBS (for 32-bit EG 8.2) , and it shows: Could not create object named "SASEGObjectModel.Application.8.1"
The program still did not work when i changed the version from 8.1 to 8.2.
You're welcome. And here's that link I promised, LOL, I forgot.
EG 7.11(64 bit) scheduling on Windows 10(64 bit) - SAS Support Communities
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.