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: 2021-02-22 05:29 PM . Last Modified: 2023-05-03 12:05 AM
I have done work in the past manipulating mimics in ViewX using VBA. For example:
Set objMimicApp = New ViewX.Application
Set objMimic = objMimicApp.Mimics.OpenFromServer(False, sServer, sFullName)
// Do Stuff Here
objMimic.Save
objMimic.Close
Is there a similar way to do things using the .NET API?
Related note, there is an executable provided with ClearSCADA called SaveAllDocuments.exe which I would assume does something similar (it is capable of opening and saving documents).
The problem that I'm looking to solve - if you delete and recreate an object that was referenced by a mimic, the new object won't appear to be referenced by that mimic until the mimic is opened and saved. I want to programmatically open and resave all affected mimics by this sort of change.
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: 2021-02-22 07:37 PM . Last Modified: 2023-04-25 03:36 AM
Solution that I've found so far is not using .NET API, it's following a similar instruction to here:
ViewX.Application theApp = new ViewX.Application();
ViewX.ServerDoc theMimic;
theMimic = theApp.Mimics.OpenFromServer(false, serverName, fullObjectName);
// Do Stuff Here
Using the COM reference in the C# Visual Studio project - "Serck Controls ViewX Object Library"
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: 2021-02-22 07:37 PM . Last Modified: 2023-04-25 03:36 AM
Solution that I've found so far is not using .NET API, it's following a similar instruction to here:
ViewX.Application theApp = new ViewX.Application();
ViewX.ServerDoc theMimic;
theMimic = theApp.Mimics.OpenFromServer(false, serverName, fullObjectName);
// Do Stuff Here
Using the COM reference in the C# Visual Studio project - "Serck Controls ViewX Object Library"
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: 2021-02-22 07:46 PM
The .NET API is for server-side things, ViewX automation interface is for client-side.
Mimics are a client-side thing so the .NET API doesn't deal with it, as far as the server knows the mimic is just a binary blob (little more complex than that but this is the idea). Using ViewX.Application which manipulates ViewX is the way ahead for what you want to do.
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: 2021-02-23 02:57 PM
I'm not sure that .NET API is for 'server-side'.. since it has the whole connection manager which is clearly targeted to client side usage. And I believe the .NET API is utilised more and more within ViewX itself.
My understanding was that both the .NET API and the Automation Interface were both for client side database interactions.
The ViewX COM interface was never really supported as an actual programming interface for integrators / non-Schneider, and relies quite heavily on COM mechanisms to work.
My ideal dream would be if ViewX mimics (and in general all object configurations) were available as some kind of structured data format in .NET. For mimics HTML/XML would be a nice fit... with the schema available in some way.
Rockwell's FactoryTalk View stores displays in an XML format, which makes it handy to write some code to manipulate. They keep making painful breaking changes to the schema, which makes it less fun.. but still makes it possible.
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: 2021-02-23 05:41 PM
Poor choice of wording from me, server-side and client-side execution of action/manipulation is probably better terminology than "stuff"
Object configs (read and write) are a server-side function that clients proxy the request to the server, mimic displays are a client-side function that just fires the result to the server to store.
And totally with you regarding XML, you can actually read mimics using XML by using original WebX, just change ?applet to be ?content in the URL. Much faster to read mimics that way than with ViewX automation, just need to use ViewX automation to write any changes back. Ironically this also is an example where my comment above is not so correct, if the server is able to give us XML via WebX then its probably not as simple as "a binary blob at the server".
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: 2021-02-24 02:55 PM
But it's not possible to obtain this XML from the .DocumentContent property on the mimic object itself (via .NET API or Automation Interface)?
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: 2021-02-24 03:09 PM
Not aware of any other method to get that XML, which may be a problem depending on what the future holds for original WebX
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.