Hi Michael,
See the "Macros and Scripting" topic in Help, under "Reference" in the table of contents:
samrepo.nrelcloud.org/help/macros.html
The LK Script page on the SAM website also has some information about the LK script used to write the macros:
sam.nrel.gov/lk-script.html
Let me know if you have specific questions about any of the macros.
Best regards,
Paul.