EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-30 12:26 PM . Last Modified: 2023-05-03 12:12 AM
I'm looking for a way of replicating something that ViewX does through the .NET API. In ViewX when there is a configuration error on an object there will be a red X on the object, and also on all of the groups that are parents of that object so users can follow the tree down to find where the actual error is. When editing the properties on that object the configuration error message is displayed.
Is there a method or something that can be called on DBObject to return this configuration error information? In looking through the API nothing is jumping out at me but I might just be missing it. It seems in ViewX to work similarly to the GetAlarms() method but I'm not seeing an equivalent "GetErrors()" method or something similar. Any way to retrieve this information would be fantastic.
Thank you for any help.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-01 05:30 PM
From what @AndrewScott has said, there is an easier way to get this information for now.
From the .NET API, if you have an object, then you can call the ValidateConfiguration Method on it, which will return an array of strings containing the errors
Not quite as much 'full' information as the Warning class would provided (since you wouldn't get a property name etc), but it should be good enough for most porpoises 🙂
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-30 06:17 PM
@stevenfaulkner darn good question this... and I felt that there was 'something'.
I've had a quick look, so far what I've found is this:
But this obviously don't provide any enumerator to get the list of errors themselves, which is a little weird, because when writing a driver, you definitely assemble a list of configuration errors to return if there are any problems. So code wise, there's definitely a list floating around inside Geo SCADA of the configuration errors.
And then this class looks like it might actually hold the Configuration Error data itself (i.e. an instance of this class might represent a single line in the Configuration Error list)... interesting that the name is 'Warning' though, so I may be entirely wrong.
Hmmm... and then I come up blank.
My thought was that you'd need to instantiate a Client.Simple Connection object, and then somehow get a Client.Advanced Interface from that (but I can't find what Client.Advanced Interface that might be), and then hopefully that Interface exposes a Method or Property which returns a set of all Warnings (likely sorted by ObjectId... or not...) and you'd need to filter this list down by ObjectId to get the warnings associated with the object that you care about.
@sbeadle / @AndrewScott Is this possible a gap between the internal 'private' interface and that exposed through the .NET API? I feel that I've been able to do this before, but perhaps that was using the Automation Interface...
Was I on the right track, and the just missing the connections in the middle to get from Client.Connection -> Client.Advanced.ISomething -> enumeration/set of Warning
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-31 02:20 AM . Last Modified: 2020-08-03 05:54 AM
There is an undocumented method in the ClearScada.Client.Advanced namespace to get the configuration validation errors of an object:
Warning[] IObjectHierarchy.GetValidationErrors( ObjectId objectId )
There is also the database method ValidateConfiguration() in the CDBObject table which revalidates an object's configuration and returns the list validation error messages.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-31 06:29 AM
Thank you both so much for the replies but to be honest I'm still a little confused here. Is there a class that implements the interface IObjectHierarchy? With just the interface I have no idea how to implement that methods if I were to write my own class that implements the interface.
Also ObjectDetails looks like it only accepts a Stream in it's constructor, but I'm not seeing a way to Serialize a DBObject into a memory stream. When I tried to do it with BinaryFormatter it doesn't know how to do it. I'm assuming what I need to be doing is calling some other method that returns ObjectDetails rather than trying to instantiate it on its own but I'm not finding a method that does that.
// // Summary: // Initializes a new instance of the ClearScada.Client.Advanced.ObjectDetails class. // // Parameters: // stream: // The stream. public ObjectDetails(Stream stream);
Is that web documentation in your screenshots @BevanWeiss something that is included in the documentation of GeoSCADA or something you generated yourself from the XML documentation?
Thanks again for any assistance.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-01 12:20 AM
@AndrewScott Any chance of getting this 'documented' into the next release of the .NET API CHM?
(If you'd like me to submit a ticket with Tech Support for the traceability just let me know)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-01 12:31 AM
@stevenfaulkner I'm not sure which 'web documentation' you refer to... but I suspect it's the .NET API CHM (which you should have found in the Start Menu 😉
What's the XML documentation that you're looking at? It sounds a bit more painful than just looking in the help file.
Is that web documentation in your screenshots @BevanWeiss something that is included in the documentation of GeoSCADA or something you generated yourself from the XML documentation?
For most of the Client.Advanced functionality you just need to 'cast' it across from a Client.Simple object.
So I would expect for ObjectDetails there would be like a GetDetails(), or ObjectDetails property on the Client.Simple DBObject
Or perhaps a method on the Client.Advanced session/connection thing, that might accept a DBObject and would return an ObjectDetails reference.
I'll have a look in a few hours...
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-01 09:41 AM
Thanks I didn't see the .NET API help chm file. I was just using the object browser in Visual Studio based on the ClearSCADA.Client.dll XML comments. I thought your screenshots were something you did yourself so it inspired me to use docfx to generate a site from those XML comments for myself. Turns out I should've had the official documentation help file all along and just didn't find it!
Thanks for the explanations, I haven't delved into the ClearScada.Client.Advanced stuff much, most of what I do is all based on the DBObject or Connection classes. I'll dig into it more when I get back in the office but if anyone has an examples of what methods will return an ObjectDetails class or which classes implement the IObjectHierarchy interface that I can call that method I would greatly appreciate it.
Thanks again for all the help.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-01 05:30 PM
From what @AndrewScott has said, there is an easier way to get this information for now.
From the .NET API, if you have an object, then you can call the ValidateConfiguration Method on it, which will return an array of strings containing the errors
Not quite as much 'full' information as the Warning class would provided (since you wouldn't get a property name etc), but it should be good enough for most porpoises 🙂
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-03 02:33 AM
@BevanWeiss, the ClearScada.Client.Advanced namespace was only intended to be used internally by ViewX, but over time a few small bits of it have 'leaked out' into the documentation. You're welcome to request that more of this namespace is documented.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-03 02:37 AM
The undocumented IObjectHierarchy interface is part of the IServer interface, see the Connection.Server property.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-03 05:42 AM
Thank you both so much for all the information and options. I think Andrew accidentally had a typo in his answer because I tried ValidationConfiguration but got the error that the method didn't exist when I tried to InvokeMethod on it. So thanks for clarifying that it should be ValidateConfiguration that gives me the functionality that I need.
Thank you both again.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-08-03 05:56 AM
@stevenfaulkner you're right correct about my typo, I've corrected the original reply.
Link copied. Please paste this link to share this article on your social media post.
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.