BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PhilC
Rhodochrosite | Level 12

What is the "SASEGObjectModel.Application.x.y" string for the new EG version 8?

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

6 REPLIES 6
ChrisHemedinger
Community Manager

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

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
PhilC
Rhodochrosite | Level 12

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

 

Momo0404
Calcite | Level 5

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.

PhilC
Rhodochrosite | Level 12
There is a need to match bit-ness with your SAS installation and the scripting executable in your OS. I'm going to assume your using Window 10. There are resources that explain this online and also here on this forum. Search for ”cscript" when look. Give me some time I'll respond with a link.
Momo0404
Calcite | Level 5

@PhilC 

 

It works successfully! Thank you for your help.

PhilC
Rhodochrosite | Level 12

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 5269 views
  • 1 like
  • 3 in conversation