2/8/2022 7:11 AM | |
Joined: 10/19/2021 Last visit: 2/28/2022 Posts: 46 Rating:
|
DM987 mentioned to use 67 as WindowFlag (not 64) in his example. Maybe this is the error? |
2/8/2022 11:44 AM | |
Joined: 6/22/2017 Last visit: 9/5/2025 Posts: 423 Rating:
|
Hi, the error message, that Faceplate.... is not defined is correct here. The example provided before is probably taken from inside a faceplate. From the outside your code should have worked, you just failed in that one line, where you wrote po[number].HMIWindowFlag = 64; By the way, i don't know how you store that number. You create an array of possible Faceplates and fill the index with a text-string? Have a look at the following document on how to trace / debug: https://support.industry.siemens.com/cs/ww/en/view/109758536 I would be curious, if po[number] is the correct object. If so, WindowFlags should work on that. Greetings |
2/9/2022 8:19 AM | |
Joined: 6/22/2017 Last visit: 9/5/2025 Posts: 423 Rating:
|
well... if the default snipped is not working...
... then i would open a support request to the siemens tech support. If you are sure, that the interface data is correct and the Faceplatename is matching, it has to work. You can open a ticket here: Greetings |
Last edited by: ZickZackTIA at: 02/09/2022 10:08:19set WindowFlags before Visible |
|
2/9/2022 9:56 AM | |
Joined: 3/18/2019 Last visit: 2/23/2022 Posts: 5 Rating:
|
Hey! The first example was for applying within a template. To call the template from the screen, see the example in the video.
export function Button_17_OnDown(item, x, y, modifiers, trigger) { let tag1 = Tags("HMI_Tag_1"); let WindowFlags = tag1.Read(); let data = {A:{Tag:"HMI_Tag_1"}, ColorProperty:0xff00ff00}; let po = UI.OpenFaceplateInPopup("Faceplate_2_V_0_0_3", "title", data); po.Left = 550; po.Top = 60; po.WindowFlags = WindowFlags; po.Width = 426; po.Height = 300; po.Visible = true; AttachmentOpenFaceplateInPopup.zip (487 Downloads) |
Follow us on