• 105 views | 2 messages Discussion: LEAP
    Topic: Choosing Scenarios to Calculate via APISubscribe | Previous | Next
  • Ethne Laude 7/22/2022

    Hi,

    I was wondering if there was a way to check/uncheck scenarios to calculate results for via the API

    Thanks!
    Ethne
  • Charlie Heaps 7/22/2022
      Best Response

    1 Like

    Here's some sample VBScript code for the Script Editor (try this on Freedonia)...
    It prints out list of scenarios and their calculation settings, then changes one, then reprints..

    CLS
    PRINT "Before..."
    for each SC in leap.Scenarios
    print SC.ID & " " & SC.name & " " & SC.ResultsShown
    next
    leap.Scenarios("Mitigation").ResultsShown = false
    REM or you could do..
    REM leap.Scenarios("ID=11").ResultsShown = true
    PRINT "After..."
    for each SC in leap.Scenarios
    print SC.ID & " " & SC.name & " " & SC.ResultsShown
    next