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

Im using SAS Enterprise Guide 4.1

When I try to run these two lines of code in VBScript:

Set Application = WScript.CreateObject("SASEGObjectModel.Application.4")
WScript.Echo Application.Name & ", Version: " & Application.Version

I receive the error below.

Error: could not locate automation class named "SASEGObjectModel.Application.4.1".
Code: 80020009
Source: WScript.Createobject

If I change to Set Application = CreateObject("SASEGObjectModel.Application.4"), I receive the error below:-

Error: ActiveX component can't create object: 'SASEGObjectModel.Application.4'

Code: 800A01AD

Source: Microsoft VBScript runtime error


I'm running on window 7 32 bit.

Appreciate the help.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

This might be an installation issue, where the SAS EG scripting model isn't registered.  Can you run this command (from a Windows command prompt) and try again?


C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\RegAsm.exe /codebase /tlb "C:\Program Files\SAS\Enterprise Guide 4\SASEGScripting.DLL"


You might need to change some of the paths to fit your system.


Then here is a test script:


Option Explicit

Dim App

On Error Resume Next

Set App = CreateObject("SASEGObjectModel.Application.4")

If (App Is Nothing) Then

   Dim strmsg

   Dim errNum

   If Err.Number <> 0 Then

       strmsg = "Error #" & Hex(Err.Number) & " " & Err.Description

                                 Wscript.Echo("Cannot create SASEGObjectModel.Application.4: " & strmsg)

                End If

End If

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

2 REPLIES 2
ChrisHemedinger
Community Manager

This might be an installation issue, where the SAS EG scripting model isn't registered.  Can you run this command (from a Windows command prompt) and try again?


C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\RegAsm.exe /codebase /tlb "C:\Program Files\SAS\Enterprise Guide 4\SASEGScripting.DLL"


You might need to change some of the paths to fit your system.


Then here is a test script:


Option Explicit

Dim App

On Error Resume Next

Set App = CreateObject("SASEGObjectModel.Application.4")

If (App Is Nothing) Then

   Dim strmsg

   Dim errNum

   If Err.Number <> 0 Then

       strmsg = "Error #" & Hex(Err.Number) & " " & Err.Description

                                 Wscript.Echo("Cannot create SASEGObjectModel.Application.4: " & strmsg)

                End If

End If

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Cyn
Calcite | Level 5 Cyn
Calcite | Level 5

Thanks Chris, It works!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 2 replies
  • 3267 views
  • 0 likes
  • 2 in conversation