43429members
217967posts

[Imported] Reopen a faceplate

Highlighted
Sisko

[Imported] Reopen a faceplate

>>Message imported from previous forum - Category:Scripts and Tips<<
User: mchartrand, originally posted: 2018-10-19 17:30:52 Id:148
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.

-------------------------------

**_lecadi:
I was wondering if someone here knows how to block a faceplate, i means i have designed an application where the top mimic has some link inside for open some faceplates, but i realize that you can reopen these faceplate as many times as you want.
I would like to knows if you can control this, with some parameters of the faceplate, Maybe something like panelON active panelON off_**

-------------------------------

AWoodland:
Hi, there's no close event so there's no way to do this reliably.

The closest I think you can come is by writing something to the registry when the mimic is loaded, and checking on startup that if that value matches what you want to write then it's the same mimic so just close it again. What will be a problem is when you close the faceplace and then try to reopen it, won't work until you open another faceplate.

I doubt it's acceptable though!

You could use the maximum open windows setting in Tools- Options to reduce the impact of opening the windows.

____________________________

**_lecadi:
Thanks for your answer
What iam trying to do is this:
When the person click in the link , this open the faceplate and at the same time a bool variable has to set in 1, and when this variable in setted in 1, I pickdisable the links of the same faceplate. With this I can lock the link.
When the person close the faceplate with a button in the faceplate a reset the bool variable to 0 and i can open the faceplate again.
I have a problem with the rigth X in the windows of the faceplate, just beacuse if the person close with this X the faceplate you cant reset normaly the bool variable. So I´ve decided to put a timer for a minute and this reset automaticaly the bool variable after the person open any faceplate. If you have another way of doing this, I will be thankful._**

_______________________________


AWoodland:
Sounds like the best you can do, as I mentioned there is no OnClose type event so you can't do anything when the mimic is closed.

Just be careful, if they accidentially close the faceplate then might get frustrated if they can't open it too quickly again afterwards, just an observation to watch out for with the operators.

______________________________

natebergeron:
The other thing you can consider is using a Form in VBScript. It's not as flexible as a mimic but it will only allow 1 popup. It just might suit your needs.

__________________________________

bevanweiss:
As Nate mentioned, a VBscript form might be your best option, however it does come with the issue of being modal (that is you can't access any other ClearSCADA windows whilst it is being shown).

Nate: I know that JavaScript isn't recommended by Schneider for scripting, but have you had much experience in using it for forms? The VBscript forms are a bit painful... perhaps JScript has some benefits in this area.

___________________________________

natebergeron:
Is it even possible to use jscript in ClearSCADA? If so, how?

It could be interesting.

That being said, you CAN do some pretty creative stuff with the ClearSCADA forms function in vbscript. See my calendar pop up in the scripts and tips section.

________________________________________

AWoodland:
It just runs in the Microsoft ActiveScript engine so you can install any of the extensions and get the languages you want. I believe VBScript and JScript are by default installed, can change the languages by right-clicking in the script window.

The Form object is created by ClearSCADA so will be the same functionality whatever langauge you use, I don't believe JScript or VBScript have any native forms functionality you could use.

_____________________________________________

evandew:
To come back to the original question, it is possible with a bit of a "hack".

Attached is an example / mock up (no guarantees given).

This is using a wrapper dll to talk to the Win API and in this way makes it possible to allow only one instance of the pop up and e.g. remove the min/max/close button and change the title for the pop up. I never got the transparency to work tough.

To use it simply copy the Dynwrap.dll to a location on the ViewX station you want to have this and register it (if you don't know how, you shouldn't use this).

____________________________________________

Anaguib2000:
evandew, I know this is a little bit late, but do you still have this dll file? as I can't find any attachment to your reply.

Have you done it successfully to remove the Close, Min, and Max buttons on the ViewX popups?