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: 2024-04-09 05:41 PM . Last Modified: 2024-04-16 11:11 PM
Hi,
I can open, close and manipulate mimics using C# however for easy of code management (and lack of a dev machine in prod environment!) I would prefer to use Powershell. Has anyone had any luck using Powershell with the ViewX automation interface? My attempts to port the code have been less than successful
I had to use the DLL extracted from somewhere into the Visual Studio obj folder and reference that instead of the DLLs in the install folder as they gave errors, i.e.
Add-Type -path ".\Interop.ViewX.dll"
And then
$vx = New-Object -COMObject "Serck.ViewXApplication" # Works fine
But my attempts to use .Mimics.OpenFromServer in Powershell fails based on getting the parameters right, not even getting it to compile, e.g. various attempts such as:
$m = $vx.Mimics.OpenFromServer -ReadOnly $False -Server $systemname -Path "Some.Mimic"
or
$m = $vx.Mimics.OpenFromServer $False $systemname "Some.Mimic"
https://stackoverflow.com/questions/5544844/how-to-call-a-complex-com-method-from-powershell had a suggestion that I couldn't get to work either (runs, errors calling the invoke with 8 parameters)
Attaching the basic code with the SO function included, thoughts welcome!
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: 2024-07-08 03:57 AM
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: 2024-07-08 03:57 AM
Looks like no-one has Adam!
(Replying because our system needs it!)
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: 2024-07-08 07:30 PM . Last Modified: 2024-07-08 07:31 PM
I haven't got anything to work since my post, maybe future me or someone else will find this post and have a solution!
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.