I'm not at all sure that what I need is possible with the tools that I have, but I thought I'd ask.
I have the following Python script (technically IronPython, but I don't fully understand the difference), that I pulled from a blog and modified for my purposes:
import datetime
from System.IO import StreamWriter
from Spotfire.Dxp.Application.Visuals import TablePlot
tempFolder = "C:\\Spotfire Exports\\"
tempFilename = "Data.txt"
writer = StreamWriter(tempFolder + tempFilename)
vTable.As[TablePlot]().ExportText(writer)
print tempFolder + tempFilename
The script itself works perfectly fine, but the problem is that I need to be able to make this run automatically at a certain time of day, i.e., I need the *.txt file to be updated in the morning before I get to my desk. (The project pulls from a database that isn't accessible through MS Access.)
Although the script runs fine, I have to manually push the button to activate it. I can't seem to find any way to have the script run on file open (so that I can use Windows Task Scheduler) to make it run when the file is opened.
Does anybody know if there's a way to do this?
Bear in mind, I do not have Visual Studio available to me. I already tried Visual Studio Express, and it doesn't seem to be able to access the Spotfire SDK macros.