Media and Paths
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 ]


When StampPlot runs the first time, a self-extracting file called "sppmedia.exe" is extracted to the installation directory.  These directories hold media, macros and other files used by StampPlot or for your data. 

bulletData: Used by default to hold logged data, plot files (.plt), and snapshots (.jpg). 
bulletMacro: The default directory when a macro is executed. 
!MACR startup
bulletButtons: Holds .btn files used for installed defined menus and buttons.
bulletMaclib: Used to hold common macro library routines called by some installed macros examples.
bulletspp_pobj:  Used to hold the most current macros for version 3 Plot Objects.
bulletsws and v2: Holds older example macros for versions 1 and 2.
bulletwizards: Holds older macro wizards. The pop-up 'Plot Menu' examples for various plot examples are held in this directory.
!MACR wizards\xyplot

bulletMedia:  Holds a collection of media for StampPlot.  This is the default directory when using image and wav instructions (PWAV, IWAV, IMGP).
bulletRoot directory: a collection of WAV files: 
~PWAV gbell
bulletbacks: Sample backgrounds for plot area. 
!BIMG backs\bl_bas.jpg
 
bulletcomp: collection of component images for image plotting or use with plot objects:
~IMGP 30a,30a,50a,60a,comp\7seg_2.jpg
bulletmasks: When using AND and OR image plotting (IMGA IMGO), these may be used for masking.
bulletmisc: A handful of various images.
bulletshapes: Collection of various image shapes, colors and textures.  
~IMGP 60a,30a,70a,40a,shapes\oak\rect.jpg

Default directories may be over-ridden by specifying a full path:
~PWAV c:\windows\media\notify.wav       (Windows XP Example)

Using Graphics Media
Graphic images, such as JPEGs, BMPs and WMFs may be plotted in the same fashion as drawing using all the available coordinate modes.  Just as in drawing, images may be placed on the plot or the background.

To make some room:
' Clear plot objects
!POBJ Clear
' Change plot percent
!PPER 80,80

On the plot, an image may be placed using the IMGP instruction.

(Drawing mode)IMGP x1,y1,x2,y2,path\image_name

For example, to place an image of an LED on the plot:
~IMGP 10a,0a,20a,20a,comp\led_red_1.jpg

To place an image on the background:
~POBJ oBack.Draw=IMGP 80,50,90,60,comp\led_red_0.jpg

IMGO may be used to logically OR the image colors with those already present.

IMGA may be used to logically AND the image colors with those already present.

Using Sound Media
WAV files may be played using the PWAV or IWAV instructions.  PWAV, play WAV, will not interrupt any current WAVs being played.  IWAV, immediate WAV, will interrupt the current WAV.

~PWAV gbell
~IWAV whistle

Paths:
By default, the StampPlot Media directory is the default directory.  As in above, gbell.wav resides in this directory.  The LED_RED_1.JPG is in the "comp" subdirectory of Media.

If a macro is being run that does not reside in the root, the (PATH) value may be used to specify the macros directory should be used.
~PWAV (PATH)my_wav

The full path to media may also be used.
~IMGP 10,10,20,20,c:\my_folder\my_image.jpg