1
Automation Interface, Add-Ins and Tools / Re: How to get the Trigger-Data of a Timer event ? (C# script)
« on: December 04, 2018, 09:20:39 pm »
Ok, thank you.
bd
bd
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
EA.Element sourceElement = repo.GetElementByID(id);
if (sourceElement.MetaType == "AcceptEventTimerAction")
{
XmlDocument xml = new XmlDocument();
string query = repo.SQLQuery("SELECT * FROM t_xref WHERE Description=\"@PROP=@NAME=kind@ENDNAME;@TYPE=ActionKind@ENDTYPE;@VALU=AcceptEventTimer@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;\"");
//System.IO.File.WriteAllText(@"C:\text.xml", query);
XmlReader xmlreader = XmlReader.Create(new StringReader(query));
using (xmlreader)
{
while (xmlreader.Read())
{
if (xmlreader.Name == "Client") {
// I am a bit confused here
EA.Element swComponent = repo.GetElementByGuid(xmlreader.ReadInnerXml());
}
}
}
}