Hi Dojo,
I am trying to write a script and hit a wall.
I want to trigger a QAction using a C# script I made and so far I cannot figure it out atm.
Any help on this would be much appriecated
Hi,
QActions cannot be triggered by an automation script, at least not directly.
QActions have a trigger associated with them in the XML side of the connector and what you could do is to make a set on a parameter and use that parameter as the trigger for the QAction you want to execute.
This could be something like a button or a "regular" parameter if you want to use it as well to pass extra information to the QAction.
*EDIT*
Example
<Params>
<Param id="1">
<Name>MyParameter</Name>
<Description>My Parameter</Description>
<Display>
<RTDisplay>true</RTDisplay>
<Positions>
<Position>
<Page>General</Page>
<Column>0</Column>
<Row>0</Row>
</Position>
</Positions>
</Display>
<Type>write</Type>
<Measurement>
<Type width="110">button</Type>
<Discreets>
<Discreet>
<Display>Run</Display>
<Value>1</Value>
</Discreet>
</Discreets>
</Measurement>
</Param>
</Params><QActions>
<QAction id="1" name="My QAction" encoding="csharp" triggers="1">
...
</QAction>
</QActions>
Hi Amer,
Unfortunately, that is not possible as you mention but it definitely should work with a parameter set
Can you confirm for me how you have your code currently set up?
You should have 1 parameter defined in your protocol xml and a QAction triggering on it (see example in my edit on the original answer)
Hi,
I asked the same question a while ago, with the same answer.
I ended up adding a dummy parameter that triggered the QAction
<Param id="9">
<Name>ExternalTrigger</Name>
<Description>External Trigger</Description>
<Type>dummy</Type>
</Param>
and set that parameter to a value of 1 from the automation script
element.SetParameter(externalTrigger, 1);
Hi Joao,
That is unfortunate.
I have tried to set but does not work in this case.
is there anyway to get the SLProtocol for a specific ELement as that would help me the most