Page 1 of 1

Help writing macro in Chemstation

Posted: Fri Apr 19, 2013 4:54 am
by Leni
I could really use some help...after realising while writing a macro to extract information to excel reports that some information can't be extracted without reading the data from the reports, i have turned to seeking help to do this.
[...]
I have figured after reading the Chemstation Help, that the macro should solve this problem. Only thing is, i don't really know how to do it right now.
Problems/things i don't know:
1)Which file contains this information on the harddrive?!
2)how to extract the data according to modification times from the reports?
[...]

Re: Help writing macro in Chemstation

Posted: Tue Apr 23, 2013 1:28 pm
by nimbi63
Select Help > About, and post the revision and build number of your ChemStation software.

Re: Help writing macro in Chemstation

Posted: Tue Apr 23, 2013 3:37 pm
by GasMan
The following relates to the GC ChemStation.

When you load a signal file into ChemStation, a register is built up which will contain the information you are looking for. If you have a signal loaded and you then type the following into the command line, Print ObjHdrVal(Chemres,"AcqMethModTime"), you will get a large number. This number is time of the change given as the number of seconds from midnight on January 1st 1970. The task then is converting this to a meaningful date and time..............

Gasman

Re: Help writing macro in Chemstation

Posted: Tue Apr 23, 2013 9:18 pm
by nimbi63
Based on Gasman's reply, use:

A=ObjHdrVa(ChromRes,,"AcqMethModTime")
MethModTime$=Time$(1,A)

Then use MethModTime$ in your report.

Re: Help writing macro in Chemstation

Posted: Wed Apr 24, 2013 12:18 pm
by GasMan
nimbi63,

Thanks, you learn something new everyday.

Gasman

Re: Help writing macro in Chemstation

Posted: Thu Apr 25, 2013 4:55 am
by Leni
Select Help > About, and post the revision and build number of your ChemStation software.
Sorry first of all for the late post. i had some personal trouble (when they come, they come all together! :() and didn't have a pc for a few days.
The Chemstation Revision is: Rev.B.03.02[341]

Thanks a million for your kindness!
Regards,
Leni

PS. so i just write a simple macro with those few lines?

Re: Help writing macro in Chemstation

Posted: Mon Apr 29, 2013 4:28 am
by Leni
Help?!?! :(

Re: Help writing macro in Chemstation

Posted: Tue Apr 30, 2013 6:25 am
by Leni
nimbi63 , GasMan please send me an email to lenard21@gmail.com and help me a bit more, because i'm experiencing some difficulties, which i was not expecting. Thanks you. Your help is greatly appreciated.

Re: Help writing macro in Chemstation

Posted: Tue Apr 30, 2013 2:14 pm
by nimbi63
Hello,

Sorry, was at the beach for several days. :D

Create a Report Layout (or just open estd.frp) and in the General section, place fixed text as:
Method Mod Time:
Then select the Text at the top and draw the area where you want the date/time. Select 'Computed Text (user defined macro)" Click the 'Select File' and choose ShortUtil.mac, for the name, after USR_ enter 'MethModTime$", then 'Edit Macro/Append new Macro Frame to file".

The macro will open, scroll to the bottom to find:
********************************
name USR_MethModTime$
********************************
At the top of this macro will be a line:
local Text$
change this line to:
local Text$, A

just after the comments (lines starting with an exclaimation mark '!') enter two lines as:

A = ObjHdrVal(ChromRes,"AcqMethModTime")
Text$ = Date$(2,A,"dd MMM yyyy ")+ Time$(1,A)

Following this will be the "Return Text$"

Save and close the macro, select File and save the template (or Save Template As..).
Select File > Add to Report Styles, and give your new report a name.

in Data Analysis, go to Report > Specify Report, and in 'Style", select your report.

Save the method, and print the report.

Re: Help writing macro in Chemstation

Posted: Tue Apr 30, 2013 7:16 pm
by Leni
Hello,

Sorry, was at the beach for several days. :D
Thanks a million man, you're a lifesaver. Hope you enjoyed your time at the beach. I'm forever in your debth.
Respect and regards,
Leni