to closed all PopUps add this script on the "cleared" event of the screen let ui = UI; let count = ui.PopupScreenWindows.Count; for (let i = 0; i < count; i++) { ui.PopupScreenWindows(0).Close(); }
@arnaucapellgracia1415
2 жыл бұрын
I think this is also possible if in the OpenFaceplateInPopup system function, in the call input called Independent Window. Just put in False. Then the Popup automatically closes if the Parent is closed. So it works even in a screen change
@DerHecht40
2 жыл бұрын
Hello, yes, that is possible. In my "real" UseCase the PopUps have to stay open after the screen change. I forgot to adjust it for the video
@michaelbrand7570
2 жыл бұрын
Dear Hecht Thank you for sharing all these verry helpfull informations. This will help me to solve a lot of problems with multiple instances of faceplates.
@reparee
Жыл бұрын
Now that V18 is out, is there a smarter way to limit one popup per faceplate instance? Fetching the name of each faceplate using simulation and DevTools kind of defeats the purpose of using faceplate. It's a lot of manual work.
@michaelporzell8112
Жыл бұрын
@DerHecht4.0 Thank you for your Video. I get started with Unified as well and try some things. I have the situation that I don't want when a Popup is open, the User can touch parts of the screen. Only the Faceplate in the Popup is able to edit. With opening the Faceplate in a Popup like you, I show as well on the Main screen on a higher Layer a gray Frame with the property visibility. That works well. But I can't make it reverse by closing the Popup. Do you have an idea how to handle with that?
@arnaucapellgracia1415
2 жыл бұрын
Amazing way to do that. I had reached a similar strategy but was not so useful. How did you find that method/property inside UI.PopupScreenWindows ->>?? This is like hidden it don't appear in auto-complete list and neither in Siemens documentation. Also you had to make a copy of the UI object in order to compile the solution...
@DerHecht40
2 жыл бұрын
Hi, I have find this info about the PopupScreenWindows in the Siemens Forum support.industry.siemens.com/forum/do/en/posts/wincc-unified-tip-s-for-faceplate/225140/?page=2&pageSize=10
@MrMuz12345
Жыл бұрын
I am a complete amateur at script, this seems so complex, where is the best place to start learning? I can configure visualisation and plc code but javascript is making the common engineers life difficult. Any pointers in the right direction for education would be well received. Thankyou for your sharing your vast knowledge.
@wesleyhaast2302
4 ай бұрын
hi, right now i have aprogram with 1 popup (parent) that can open some popups with extra info. how can i close all the child popups all togheter with the parent?
@J0SENone
2 жыл бұрын
Love it! Thank you 😊
@PhucLe-dv4vr
2 жыл бұрын
I want to create an operating log file for the system. After a period of 10 minutes, the self-recorded data to the excel file is available (This file will also be updated automatically as daily), how many columns are recorded in the column, how many rows into the excel file I created. In this case I did on WinCC Professional using VBS code. Please help me with this problem, boss. Thank you very much !
@petervranks2723
Жыл бұрын
Fan of Mr Fish !!! Thanks a lot... Is there a document somewhere that describes all the possibilities with the UI stuff ?
@DerHecht40
Жыл бұрын
Hi Peter, I don#t know a documentation of that UI stuff
@jonathanvelasco3490
Жыл бұрын
Your videos are great. Thanks!
@UrkkiTheMan
Жыл бұрын
How to position the popup in the middle of the screen or check the popup is not outside of the screen?
@dpibernat
9 ай бұрын
Hello, did you solve this? I'm having the same problem
@UrkkiTheMan
9 ай бұрын
@@dpibernat export function event_button_OnTapped(item, x, y, modifiers, trigger) { let ui = UI; //get the compiler to accept "UI." here //get the active screen dimensions (the screen where the event element is located) let SysHeight = ui.ActiveScreen.Height; let SysWidth = ui.ActiveScreen.Width; //other function(s) for the job: //let SysHeight = ui.GetClientInfo(UI.Enums.HmiClientInfoType.PrimaryDisplayWidth); //let SysWidth = ui.GetClientInfo(UI.Enums.HmiClientInfoType.PrimaryDisplayHeight); //RootDisplayHeight //calc center with the to-be-opened faceplate dimentions div. by 2 let Posleft = ((SysWidth / 2) - 405); let PosTop = ((SysHeight / 2) - 236); //open popup with disciption as popup window name and clac. position let Discription = Tags("UDT.ID").Read(); let po = Faceplate.OpenFaceplateInPopup("meas_trend_popup_V_0_0_01", Discription + " trend popup", true, false); po.Left = Posleft; //calc:ed center of the screen po.Top = PosTop; //calc:ed center of the screen po.Visible = true; } export function Button_open_trend_OnTapped(item, x, y, modifiers, trigger) { // Retrieve the motor ID from the HMI_motor_interface.status.ID tag. const id = Tags("HMI_motor_interface.status.ID").Read(); // Open the motor trend popup using the motor ID and set its visibility to true. const popup = Faceplate.OpenFaceplateInPopup("motor_trend_popup_V_0_0_4", id, false, { modal: false }); popup.Left = Faceplate.Width; popup.Top = -32; //popup top bar offset popup.Visible = true; }
@radoslavklein662
2 жыл бұрын
Hello, little different topic.. But I cant figure It out. Access Object, property from local script is possible this way ......."Screen.Item("Recatngle_x").Visible = true;"..... question is how can I do similar thing but from global module script called for expample on different screen button event ?? is it different syntax, usage of FindItem, UI, or what ?? couse when I do so I get this error ......(,Module "Global module" referenced by the function list module contains an error: Script function "Function": Object member: UI not supported in current scope in line 17, at column 0 )..... Thank you very much....
@filipkavcic664
2 жыл бұрын
Hey. You can use Screen.FindItem(). There is a very usefull page in Tia portal's Information system where it's explained very nicely. Search for this: "FindItem" method (UI.FindItem, ScreenInterface.FindItem, FaceplateInterface.FindItem)
@wesleyhaast2302
4 ай бұрын
and thanks, this script works great ;)
@naveenramalalingam9885
2 жыл бұрын
Hello Hecht, For I/O filed how to do it the display format Decimal with Decimal place 2 and Format pattern as 99999 in unified script ?
@DerHecht40
2 жыл бұрын
You can adapt the script from this video kzitem.info/news/bejne/znienGV5cHthnXo
@naveenramalalingam9885
2 жыл бұрын
@@DerHecht40 My case, tag format is Dint. so that how could I insert the "." decimal place in between ?
@TadeuszZioo
Жыл бұрын
Hi, I don't see where you defind interface (tags and properties) before open popup....
@DerHecht40
Жыл бұрын
Hi this is not needed, The Interface is handover from the Faceplate Instance when opening the PopUp
@TadeuszZioo
Жыл бұрын
@@DerHecht40 Can I use only tags and properies from Faceplate instance or maybe is posible definde addtional tags and properties?
@DerHecht40
Жыл бұрын
@@TadeuszZioo If you call a PopUp from a faceplate this is not possible
Пікірлер: 32