Page 1 of 1

Chemstation: Add menu using USER.MAC?

Posted: Tue Nov 22, 2011 2:57 pm
by BaasHarm
I've created some macros to do some custom excel reporting in Chemstation for GC analysis. I got them to work but now I want to add a menu item in the Data Analysis view under Report directly at the startup of both the on-line and off-line versions. When use the MenuAdd command I can create the menu I need but when I add it the the USER.MAC macro that runs at the startup, it won't create the menu, any suggestions how to do it, here's my user.mac:

macro GCIdle.mac
macro LPGxport.Mac
Switchview DA
menuadd "&Report", "Print LPG Report","macro lpgmenu.mac"

After startup I can use the macro's and commands I created in the GCIdle & LPGXport macro's, so the user.mac is executed but it won't create the menu.
When I call the user.mac from the command line, the menu is created allright but I want it to do that automatically at startup, what am I missing??

Re: Chemstation: Add menu using USER.MAC?

Posted: Tue Nov 22, 2011 3:40 pm
by mckrause
Which rev of Chemstation are you using?

Re: Chemstation: Add menu using USER.MAC?

Posted: Tue Nov 22, 2011 6:13 pm
by BaasHarm
B 04.01

Re: Chemstation: Add menu using USER.MAC?

Posted: Thu Dec 01, 2011 10:08 pm
by blackwaterarmstrong
Try this:

Create a new macro, called e.g. 'Addmenu.mac'. placed into the CORE directory.

Content of Addmenu macro:

Name Addmenu

menuadd "&Report", "Print LPG Report","macro lpgmenu.mac"
endmacro

SetHook "PreViewMenu","AddMenu"


Add to the USER.MAC instead Your last line:

macro _Autopath$ + "Addmenu.mac"

I hope this helps.

BWA

Re: Chemstation: Add menu using USER.MAC?

Posted: Fri Aug 28, 2015 8:30 am
by stepluke
Did this suggestion work?