Ask our Experts
Didn't find what you are looking for? Ask our experts!
Launch of Consumer/Home Owner registration process! We are pleased to announce the commencement of the Consumer/Home Owner Registration Process on Community. Consumers/Home Owners may now proceed to register by clicking on Login/Register. The process is straightforward and designed to be completed in just a few steps.
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-05 01:53 PM . Last Modified: 2023-05-03 12:33 AM
>>Message imported from previous forum - Category:Scripts and Tips<<
User: mchartrand, originally posted: 2018-10-25 18:44:38 Id:270
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.
_______
**_Andy:
I am looking for some example code of how to use the following method:
ClearScada.Client.Advanced.IQuery.ExecuteAsync
I have successfully used the following method:
ClearScada.Client.Advanced.IQuery.ExecuteSync
I do not understand how to access the QueryProgressEventArgs or QueryCompleteEventArgs from the event handlers.
Can anyone provide an example please?
For reference I have a question on Stack Overflow with full details:
[https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties](https://stac... "https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties")_**
__________________
bevanweiss:
The QueryProgressEventArgs I expect will only be a % complete indication unless you've called the ExecuteAsync with the ClearScada.Client.Advanced.QueryExecuteOptions.ReturnIncrementalData option.
Even then it's likely this isn't implemented, but is intended for the future...
I haven't tried using the Async methods.
If it really got down to it, you could always try doing a deep copy of the object into something else within your actual process and then setting a breakpoint after the query completes to inspect what was returned with each callback.
I would have expected the QueryCompleteEvent to work, and to return the Result within the Result member (as long as the Exception isn't indicating a problem). Is this not the case?
________________________
**_Andy:
Thanks for your response. I have done some further testing and updated my Stack Overflow question:
[https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties](https://stac... "https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties")
The QueryProgressEventArgs seems to show the same messages as the query list view in ViewX:
Searched x records | Created x of y records | Fetching result set
I have exactly the same issue with the QueryCompleteEventArgs as I have with the QueryProgressEventArgs as described in the Stack Overflow question.
Everything seems to work I just can't access the progress or result._**
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.