Page 1 of 1

Possible to grab Chemstation chromatogram?

Posted: Mon Feb 11, 2019 5:15 pm
by LALman
Does anyone know of a utility that can routinely grab the chromatogram that chemstation D or E generates so that I can put it in my Excel generated reports?

Re: Possible to grab Chemstation chromatogram?

Posted: Wed Feb 13, 2019 6:56 am
by antonk
As far I remember, older Chemstation place chromatogram graph in data dir during report generation (maybe some option clicking in report settings required).
This should be .WMF file. Just insert it as picture in Excel.

Re: Possible to grab Chemstation chromatogram?

Posted: Wed Feb 13, 2019 8:18 am
by Rndirk

Re: Possible to grab Chemstation chromatogram?

Posted: Wed Feb 13, 2019 7:01 pm
by LALman
antonk wrote:
As far I remember, older Chemstation place chromatogram graph in data dir during report generation (maybe some option clicking in report settings required).
This should be .WMF file. Just insert it as picture in Excel.

That really helped. I started searching for WMF info and finally stumbled on an agilent library document...

I found this pdf Exporting MS Chemstation Graphics to another Windows Application.
This works perfectly from the command line in the Environmental Data Reporting application. Can somebody more talented than I show me how to put this in a macro so that in an aquisition method I can execute it as a postrun command line or macro each time aquisition is finished? Possibly if in macro form I could execute it from dolist to generate a chromatogram.wtf for every sample in a run.

I'll keep trying in the meantime to figure out how to write this and get back with my results.

Re: Possible to grab Chemstation chromatogram?

Posted: Thu Feb 14, 2019 11:05 pm
by Multidimensional
ChemStation allows you to select and print any screen window. Each signal window (chromatogram) can be printed to a file, screen or printer.

Re: Possible to grab Chemstation chromatogram?

Posted: Mon Feb 18, 2019 10:01 pm
by LALman
Multidimensional wrote:
ChemStation allows you to select and print any screen window. Each signal window (chromatogram) can be printed to a file, screen or printer.

I want to do this post aquisition and put the WMF file right in the file directory.

I know I can type this in the execute window and have it work...
CLIP 2, "[datafile]"

and it will put chromatogram window 2 into the file datafile.wtf in the method directory. What I really want is to somehow get it to automatically use the data.ms file name and path and put it in the same directory as the data for that sample. I think I need to write a macro to do it and then execute the macro in the post-op.

Re: Possible to grab Chemstation chromatogram?

Posted: Tue Feb 26, 2019 3:46 pm
by Trishia
Maybe not as fancy, but you could run a macro as part of the method (post-method) for the "Data Analysis", where you could load up the file and the clip the TIC. Although at that point, you could also print it out to a .pdf and have it autosave;

name clipTIC
parameter fName$ d _datafile$, fPath$ d _datapath$, winNumber d 2
local value

If Len(fName$) <> 0 Then
value = FILESTAT(fPath$ + fName$)
If value[7] = 0 Then
!File not found; may want to add something to handle this exception
Else
ldnewfile (fPath$ + fName$)
!could rescale and resize window here beforehand
Clear 1
DaTitle
EndIf
Clip winNumber, fPath$ + fName$ + "\" + fName$[1:Len(fName$)-2] + ".wmf"
EndIf

return

My MSD Chemstation is older, and I can't find a direct way to print the TIC from the Acquisition session. Maybe it would be possible to take the data from the register and redraw it, but I'm not sure if that is possible within the acquisition section either...