• 144 views | 2 messages Discussion: LEAP
    Topic: Accessing results from LEAP script API with specified "Unit"Subscribe | Previous | Next
  • Chi Duan 1/10/2020

    Hi,

    I am curious about how to get the LEAP results through API with the specified "Unit" for that variable. I am scripting to analyze the LEAP results but I need the results in particular units.

    Best,
    Chi

  • Emily Ghosh 1/21/2020
      Best Response

    Hi Chi,

    To specify the units using the Value function, the code must be written in the following manner: Value(Year, UnitName)

    For example: resdemand = LEAP.Branch("Demand\Household\Urban\Electrified\Refrigeration\Efficient").Variable("Energy Demand Final Units").Value(2019, "Gigajoule")

    For other functions, review the object library in the Script Editor (Advanced menu -> Edit scripts).

    Thanks,
    Emily