BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

The object model hasn't changed much, if at all, since EG 4.2.  Here's that reference.

 

http://support.sas.com/documentation/onlinedoc/guide/SASEGScripting42.zip

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

The object model hasn't changed much, if at all, since EG 4.2.  Here's that reference.

 

http://support.sas.com/documentation/onlinedoc/guide/SASEGScripting42.zip

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

@ChrisHemedinger 

 

So I've set for myself a goal to learn to use EG to save an EGcode object to file as it would work in the "Save as" button on the menu bar which is in the pane of the Enhanced Editor while editing the code.   This "Save as" is different than the "SaveAs" method of the object and different to the button on menu bar of the Project view  " ︙► Share ► Export all code in project" (EG v8.2)

 

Can you offer a hand in revealing how this coded or a way to access the method the application evokes?  And/or is this available to the user of the EG API? 

ChrisHemedinger
Community Manager

Hi @PhilC - check my example here, which exports ALL code in a project.

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

thanks, I have used this code a lot. I want to go further than this.

 

So I want to also change the EGCode to an EGLink (? i think ?) as the first mentioned "save as" method does for a user.  When a EGCode object is "saved as", this way, the node's icon changes and code is placed in an external file, editing the code changes the external file.  I want to iterate over an object collection and do this "save as" like this to each, then save the project with its changes.

ChrisHemedinger
Community Manager

Oh, I understand.  You want to change the properties of the item in the project.  Unfortunately I don't think you can do this with the automation scripting interface.

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!

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