Just Getting Started?
If you're new to scripting in AWR the best place to start is with the Scripting Users Guide which will walk your step by step through creating your first script and then onto accessing all the information in a project. This is available from the help within the AWRDE, select Help > Contents and Index and find the section called "AWRDE API Scripting Guide". This is also available for download as a pdf file from the AWR download website.
For example you'll learn how to:
add elements to a schematic
collect and change element parameters
create graphs, measurements and access measurement data
work with em structures
collect and create layout shapes
and much, much more…
You may also be able to find a script that already does just what you want.
We also have a course we teach on scripting. Here is an example (Rt-Click and Save As "Scripting.pdf") of the material that is covered in the course.
It may also be useful to view the we've incorporated the API Reference into the MWOffice Scripting Editor. Here's how it works: Accesing API Reference in MWO Scripting.
The API diagram can help users understand the structure of the API to be more productive. Get the diagram as a.pdf
Already an Experienced Scripter?
If you're regularly writing scripts you'll need:
The Code Snippet page ( _API Coding FAQ ) is loaded with info and is a must read.
The API Reference Guide which describes al lAPI functions data members.
- The NI AWR Design Environment Sax Basic documentation has information about language not pertaining to specific functionality in AWR, as well as information about the scripting IDE: NI_AWR_Sax_Basic.pdf.
If you're trying to control MWO from other programming languages
Then you'll want to look at:
If you're having problems
There are some tips if you're having some issues with scripting
If intellisense is not working (this is the name completion while editing scripts) then you need to re-register sb6ent.ocx. In a command prompt change directories to your install directory and type "regsvr32 sb6ent.ocx".
Please see this article for more details including additional steps for Windows 7.
Sometimes when you open any scripting window to edit the code, it appears that there is no code there. The lower window where the code is stored looks gray and you don't see any text.
This is caused by the font set for the scripting environment to be set to something large, in the case we saw, it was set to 900. Setting this font back to something reasonable fixed the problem.
Open the Scripting Editor
Select "Edit > Font" from the menus
From the dialog that comes up, set the font size to 12.
Recently updated articles