Using Templates
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 ]

Templates are text files which contain StampPlot math, data markers and macro values which may be processed with current information inserted.

!TMPL template filename[,result filename]

bulletBy default, templates reside in the Macro directory and resulting processed files will be placed in the Data directory.
bulletIf the result file name is not provided, the template filename will be used.
bulletExample:  Create a text file named "Source.txt" with the following and save in the Macro Directory.

Data at time (RTIME)
The value of Channel0 is (AINVAL0).
The value of Channel1 is (AINVAL1).
The value of Channel1*Channel2 is [(AINVAL0),*,(AINVAL1)].


bulletThe following instruction will use the template, process the data, and place the result file in the Data directory as a file named results.txt.
!TMPL Source.txt,results.txt

bulletThe location of the files may be modified by specifying the location or by using the (PATH) value to use the current macro path.
!TMPL Source.txt,c:\results.txt
!TMPL Source.txt,(PATH)results.txt


bulletIf the file uses an associated extension, it may be opened through StampPlot using the application association instruction:
!APPA (PATH)results.txt

bulletWeb pages may be used in the same fashion to create dynamic pages.