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

 

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

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

 

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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