Post run macro for exporting GC-MS data to .csv (or other solutions for batch exporting 3-D data from MS)

I'm running a GC(7890A) / MS(5975C) with MassHunter Acquisition software. I automate much of my data analysis in Python by exporting the GC signal (FID) to .csv, and then exporting the MS signal using 'Export 3-D Data...' in MSD Productivity Chemstation. This allows me to apply custom algorithms for peak and baseline identification, followed by machine learning for compound matching against a mass spectral library.

However, I'm not aware of any way to batch export MS data into an accessible file format like .csv. I currently have to go through file one by one and click 'Export 3-D Data', which is impractical for large datasets. I'm wondering if I can implement a post-run macro into my GC-MS methods in MassHunter, so that the data is exported immediately after the sample is run. Does anyone have experience doing this? I'm not too familiar with Agilent's macro programming language or how the MS data is accessed within a method. 

I should note that while I'm interested in a macro-based solution, I'm open to exploring any different solutions for batch exporting MS data. Any advice for getting started would be great! Thanks.

Was this helpful?