Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Close dialog with Visu Utils

e.kislov
2018-08-16
2021-11-15
  • e.kislov - 2018-08-16

    With Visu Utils library it's very easy to open dialog from code.
    But how I can close it with this library?

     
  • e.kislov - 2018-08-20

    Edwin, hope on your advice.

    I need something like that:

    IMG: 20

     
  • e.kislov - 2018-08-24

    Any ideas?

     
  • Lo5tNet - 2018-08-24

    I have not used visu utils but this is how I have closed dialogs in the past using this function:

    This function needs to be called from the same task as your VisuElems.Visu_Prg
    We had a button that set the PLC_PRG.xCloseDialog to TRUE

    My understanding is you can't use the "CurrentVisu" Variable when using this. Hope this helps a little.

    IMG: CloseVisuDialog.PNG

    IMG: CloseVisuDialogCall.PNG

     
  • e.kislov - 2018-08-25

    Thanks, it's seems like a solution.
    Your function is not use sDialogName (so it works as "CloseAllDialogsForAllClients"), but I understand how I should edit code for my task.
    I'm very appreciated.

    I hope 3S include same FB in Visu Utils in next SP's.

     
  • MaraP - 2018-08-27

    Does anyone knows if this works also in TwinCat 3?

     
  • Lo5tNet - 2018-08-27

    You are correct e.kislov and sorry about that. Was a solution for something else we were experimenting with. To do a specific dialog you would change it to this:

    IMG: CloseVisuDialogByName.PNG

     
    • nyoman123 - 2021-11-15

      Hello, I'm quite new to codesys do you have a code example like this for opening dialog?
      Thank you

       
  • Nico01 - 2019-08-07

    Vielen dank.

    It works very well under TwinCat3.

    tschΓΌss

     

Log in to post a comment.