I'm trying to change the functionality of the run button of ADE XL.
I want it to launce some skill script befor start simulation. I did it on the past for ADE-L on IC61,
but there I add a new pull down menu button. I cant find the exact documentation that explain what to do.
I do understand that I need to defince some kind of user trigger ( deregusertriggers) that will run the script once the run button was pressed. where do I find the exact callback that being used by "run" button?
any information will be appriciated.
The right way to do this is to use the "preRun" trigger. For example:
procedure(CCFaddPreRunTrigger(sess) axlSessionConnect(sess "preRun" 'CCFpreRunTrigger))
procedure(CCFpreRunTrigger(sess sdb mode testName) printf("JUST ABOUT TO RUN TEST %L IN MODE %L\n" testName mode) t)
Call CCFregPreRunTrigger() to set it up so that the next ADE XL view you open will call the trigger.
You can find out the triggers using:
sess=axlGetWindowSession()axlSessionSignalList(sess) ; outputs the trigger names axlSessionSignalSignature(sess "preRun") ; tells you the expected arguments for the named trigger.
This avoids having to change any buttons and so on.
In reply to Andrew Beckett:
Thank you .
I will go over the new skill commands - most of them are new to me somehow.
just to see if I get it right:
- the first procidure is just to enable the option to make a prerun.
- the second procidure if the callback for a new ADE XL window..
- the third is the action itself.
am I right here?
In reply to Meny Lea:
and to add :
deRegUserTriggers("adexl" nil 'CCFregPreRunTrigger ) on .cdsinit..
Your understand is (almost) correct, except you don't need to use deRegUserTriggers (and that won't work, because you're attempting to register a menu trigger, which this isn't, and it has the wrong arguments).
All you need to do is call CCFregPreRunTrigger() in your .cdsinit or whatever to register the trigger so that when ADE XL is opened, it will do the axlSessionConnect(...)