Macro Editor
Home ] Up ] Basic Concepts ] Serial Connection ] Plotting Basics ] Logging, Saving and Printing ] Interactive Control ] Macro Basics ] Macros - Default & Events ] Macro Math Discussion ] Defined Macro Buttons/Menus ] Drawing Basics ] Media and Paths ] Drawing Coordinate Modes ] Plot Objects ] [ Macro Editor ] Using Templates ] External Applications ] Historical/Logged Data ] Internet ] Binary and Special Data ]

A macro is a text file of configuration and processing information for StampPlot.  If you have a Pro License, it's pretty easy to create a macro of configurations.

If your configuration will not use any image, WAV, or other files in the distribution which are not included with Pro:

  1. Use the menus and options to configure StampPlot.
  2. Place your objects configuring and entering code for them using the Object Editor.
  3. Open the Macro Builder/Editor.
    1. Start a new file.
    2. Tell StampPlot to build the macro.
    3. Save it.
    4. Test it by running it.
    5. Refine and save.
  4. Your .spm macro is ready for easy distribution!

If you are using other files and wish to distribute easily:

  1. Create a directory on your drive with all your specialized files.
  2. Open the Macro Builder/Editor.
  3. Build your current configuration.
  4. Save it to your distribution directory.
  5. Continue building your StampPlot Interface, updating and saving as desired.
  6. To distribute, Zip your directory (WinZIP is NOT included) and it's ready for distribution.

When using external files, StampPlot builds relative directory paths (you will see (PATH) in the file name).  As long as all your files exist in the same directory (or subdirectories) of your macro, StampPlot will be able to locate them even if they are distributed and unzipped to various paths.

New : Open : Save/Save-As : Run : Build All

bulletNew: Starts a new, empty macro
bulletOpen: Opens a current macro
bulletSave\Save As: Allows a macro to be saved.  When saving, StampPlot may ask if you wish to update the build prior to saving.  This applies to media files that may be included in your macro.  If you save to a different directory, the path to files may be affected.  Note:  If you manually change any code in the first 4 sections, your changes may be lost.
bulletRun:  Once the macro is saved, it may be run for testing.
bulletBuild All:  Builds all the sections from the current configuration.

Code Section is used to select the area of code to be viewed.

Program Header is used to enter file header information, such as date, author, rev, description, etc.

The bottom text box is used for manually entering and testing code similar to the Immediate/Debug window.  The blue text above it is the last data from the DEBUG window.

Sections:

bulletInitialize (INIT:) Updates from the current settings and choices.  This routine configures StampPlot.
bulletObjects:  Updates from the currently used plot objects and holds object configuration information.
bulletMenu Buttons: Sets the caption and code for the  Defined menu and pop-up menus.
bulletConstant Drawings:  If any constant drawings exist, this section will be updated with the current drawing configurations.
bulletVariables:  If macro variables are assigned, this section will update with current variables in use. ** If code is placed in this section, the INIT: routine needs to be "updated" to call the routine **.
bulletDefault: If USED is enabled, this routine will be called when data arrives. ** If code is placed in this section, the INIT: routine needs to be "updated" to call the routine **.
bulletReset:  This routine is called when the plot resets either automatically or manually. ** If code is placed in this section, the INIT: routine needs to be "updated" to call the routine **.
bulletDblClick: This routine is called when the plot area is double-clicked.
bulletTimer: This routine is called as configured for intervals between 0 - 60 seconds. ** If code is placed in this section, the INIT: routine needs to be "updated" to call the routine **.
bulletUser Defined:  This is not a routine in itself, but an area to create user-defined routines.  The beginning label and ENDMAC instruction must be included.  Routines are called using !MACR .routineName
Test:
    !STAT Tested!
ENDMAC


Multiple routines may be entered.

For more information, please see the discussions on Macros and Macro events and other specific discussion on these topics.