Created: 2021-09-17 02:43 AM
Does anyone know how to get Geoscada to automatically add entries onto a Global mimic.
For example if I have a Group called Demo. Demo would have 1 global mimic and every time I add an instance of a template a block would get added to the global mimic automatically and this tied automatically to the instance details.
Created: 2021-09-17 09:45 PM
There's no straight forward way to do this in a 'complex' graphical sense.
What tends to be the way to achieve this is:
a. Use an embedded query to display the list of sites, such that when the new site instance is created the embedded query will reflect the existence of this site.
b. Use map displays, so that the query that drives the map is updated with the new site, and hence the site now appears on the map. NOTE: Maps can't be embedded, so you end up having a whole popup window for such a mapping interface.
It is possible to have automation that modifies a mimic to add such a site, but it's not recommended.
There's only one customer that I've been involved in doing this for, and the return on investment just wasn't there... the squeeze was not worth the juice.
You'd want to look into the ViewX automation for this. It's not supported, not well documented, and has had some bugs in the past (which given the not supported aspect aren't guaranteed to get a speedy resolution). It's also really hard to maintain.
Plus it requires a ViewX installation, and a ViewX licence to do it. If you're manually creating sites, sure you might already have that. But if you're creating sites using the .NET API (i.e. because you're creating them in the dozens.. or automatically) then ViewX isn't a guarantee.
There's lots of ways to do tricky things which get close enough to what you want without all the effort.
For instance, if the user just wants to know where a site is.. you can have the query list, and when they select a site, you dynamically update a remote image URL so that it pulls down a static google map image with a marker at the GPS co-ords of the site in question. Relatively easy to do... and looks cool.
Created: 2021-09-18 09:26 AM . Last Modified: 2021-09-18 09:30 AM
Thanks for the reply.
With regards to the last option- how would I go about doing the dynamic updating and pulling out a static image with the correct GPS location. Would this require some VB coding?
Created: 2021-09-18 09:35 PM
Yeah it would need some VBscript / JScript.
You'd essentially have a small script associated with the embedded query, so when it's clicked it goes and gets the GeoLocation of the site clicked. If you have the lat/long as hidden columns in the embedded query this is even easier.
Embedded queries already have stuff for this.. so it's relatively easy (if you do the hidden columns and are using a newish version of GeoSCADA I'd possibly label it 'trivial')
Then you update the RemoteUrl (or whatever the correct animation param on the remote image is).. or you update a registry value with the lat/long with that reg value used in the remote image animation.
Updating the registry is definitely the easy way here too.. you could do it with like half a dozen lines of code (I want to say 3 lines, but error handling would add a couple too).
The static image is just how remote image works. You give it a url, it displays the image at the url.
Google maps static images does the heavy lifting of the rest (you just need to feed it an appropriate URL.. which will require a Google API key).
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!