Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84770members
354201posts

Manipulating ViewX from .NET API

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
AaronJust
Ensign
Ensign
0 Likes
6
1183

Manipulating ViewX from .NET API

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.


Accepted Solutions
AaronJust
Ensign
Ensign
0 Likes
5
1178

Re: Manipulating ViewX from .NET API

Solution that I've found so far is not using .NET API, it's following a similar instruction to here:

https://tprojects.schneider-electric.com/telemetry/display/public/CS/Using+the+Automation+Interface+...

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"

 

See Answer In Context

6 Replies 6
AaronJust
Ensign
Ensign
0 Likes
5
1179

Re: Manipulating ViewX from .NET API

Solution that I've found so far is not using .NET API, it's following a similar instruction to here:

https://tprojects.schneider-electric.com/telemetry/display/public/CS/Using+the+Automation+Interface+...

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"

 

AdamWoodland
Commander Commander
Commander
0 Likes
4
1172

Re: Manipulating ViewX from .NET API

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.

BevanWeiss
Spock
Spock
0 Likes
3
1134

Re: Manipulating ViewX from .NET API

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.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
AdamWoodland
Commander Commander
Commander
0 Likes
2
1129

Re: Manipulating ViewX from .NET API

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".

BevanWeiss
Spock
Spock
0 Likes
1
1102

Re: Manipulating ViewX from .NET API

But it's not possible to obtain this XML from the .DocumentContent property on the mimic object itself (via .NET API or Automation Interface)?


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
AdamWoodland
Commander Commander
Commander
0 Likes
0
1099

Re: Manipulating ViewX from .NET API

Not aware of any other method to get that XML, which may be a problem depending on what the future holds for original WebX