- Sax Basic function help document. NI_AWR_Sax_Basic.pdf
- Script Development Environment (SDE) Documentation. Scripting Development Environment
- AWR API UML Diagram AWR_V13_API_Diagram.pdf
- Shipping AWR Scripts as Examples http://kb.awr.com/x/i4dd
- Scripting KB http://kb.awr.com/x/5oRd
- The Some Topics to Think About section contains useful information on building dialog boxes and other coding approaches that will be useful.
This first script will be a simple script to show you the Scripting Development Environment (SDE) built into the AWR Design Environment.
AWR Design Environment
Launch the AWR SDE from within the AWR Design Environment. Your first step is to start the AWR Design Environment. Save the project to a file named MyFirstScript to help follow along with this guide.
When the cursor is in a word in the scripting editor, type the F1 button for help on that keyword. F1 Help in Scripting
Adding a Form (also called a Custom Dialog Box)
You may need to build a custom dialog for your script. This dialog is made easy by having a graphical user interface to develop your dialog. Scripting How-To: Adding a Custom Dialog
Dictionaries are an incredibly useful concept when working with visual basic. They are a great way collect up lists of items, especially if you don't know how many items you will need to have on your list. You can think of a dictionary like a classic dictionary; there are two pieces of information. In the classic dictionary there is a word and then the definition. In the dictionary object, there is a key and an item. The key is the word, and the item is the definition. Please see the article for details on using dictionaries. Scripting How-To: Using a Dictionary in AWR Scripting
File System Objects
The file system objects allow working with files and folders very quickly. For example, if you need to process a folder and all subfolders and look for files, these utilities make that very easy. Please see the article for details on using file system objects. Scripting How-To: File System Objects and Scripting How-To:How Can I Easily Scan Drives, Directories, Files in a Directory, and Perform Basic File Operations
Browse to a File
A simple command to get a dialog to box to ask the user to browse to a file. Scripting How-To: Using GetFilePath
Browse to a Folder
Not as simple, but sometimes you want to get a folder location instead of a file location. Scripting How-To: How to Prompt for a Folder in AWR Scripting
The Dialog Function
The dialog function allows for advanced dialog functionality such as initializing the state of the dialog, changing if items are enabled or not based on other actions, keeping the dialog open after command completion, etc. Scripting How-To:Generating S-Parameter files from AWR Scripting and Scripting How-To: Creating a Dialog with Status Text and a Progress Bar in AWR Scripting. Some shipping scripts also heavily use the dialog function, Generate MDIF from Collection of Files and Modify Graph Properties
Referencing Other Modules
You may want to use code in other modules; there are various ways to do this. Scripting How-To: Referencing Subs and Functions in Other Files
The examples so far have shown working with the AWR SDE. Python is a common scripting language and could also be used to accomplish the same tasks (see AWR Scripting in Python for setup). We show the same code to complete the same functionality in python below.