Hello,
I have a project sas enterprise guide which I want to run two branchs. I have ten branchs.
Here is my code, but it does not work.
Can somebody help me please
Thanks
# Launch the application using the registered prog ID
$eguideApp = New-Object -comObject SASEGObjectModel.Application.7.1
$chemin = "C:\Users\Desktop\test.egp"
$project = $eguideApp.Open($chemin,"")
# Show all of the process flows in the project
$pfCollection = $project.ContainerCollection
$pf=$pfCollection.item("Connexion") # Connexion is name of my branch
Write-Host " first branch " $pf.Name
# To RUN a process flow, simply use $pf.Run()
$pf.Run()
$pf=$pfCollection.item("trim1") # trim1 is name of my branch
Write-Host " second branch " $pf.Name
# To RUN a process flow, simply use $pf.Run()
$pf.Run()
$project.Close()
$eguideApp.Quit()
Hi @isek,
Your PowerShell script works fine for me -- it runs the two desired process flows. (I used EG 7.15 HF8.)
Note: The script as written runs the two flows, but does not save the project, so you won't see any difference in your project. If you want the results of the running of the process flows to be stored in the project, make sure to save the project in your script (ex. $project.Save()) before closing it.
Note 2: If you have 32-bit EG installed, make sure you are running the PowerShell script with the x86 version of PowerShell. Similarly, if you have 64-bit EG installed, use the x64 version of PowerShell to run the script.
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Hi @isek,
Your PowerShell script works fine for me -- it runs the two desired process flows. (I used EG 7.15 HF8.)
Note: The script as written runs the two flows, but does not save the project, so you won't see any difference in your project. If you want the results of the running of the process flows to be stored in the project, make sure to save the project in your script (ex. $project.Save()) before closing it.
Note 2: If you have 32-bit EG installed, make sure you are running the PowerShell script with the x86 version of PowerShell. Similarly, if you have 64-bit EG installed, use the x64 version of PowerShell to run the script.
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Hi Isek,
Yes, execution (via scripting) is by process flow, project, or individual items. There isn't an easy way to run just a single branch in a process flow via the scripting interface. I'm glad organizing by process flow allows you to accomplish your goal.
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.