Hi all,
I'm trying to open a custom dialog in my project (Codesys 3.5.9.30) without success.
I created a "Visualization" set as dialog with a couple of buttons and a rectangle with text.
In my main page, when the user click a button, I have to perform some operations and then, if the operations are completed, I need to open this dialog.
I tried with this code:
VAR_GLOBAL
  dialogMan : VisuElems.IDialogManager; // Dialog manager
  openSaveDialogConfirm : VisuElems.IVisualisationDialog; // Reference to the custom dialog
  pClientData : POINTERTOVisuElems.VisuStructClientData;
  visuRect : POINTERTOVisuElems.VisuStructSimpleRectangle;END_VAR//InmyPLC_PRGIFdwOperationResult=0THEN//Thefilealreadyexist. Askforoverwrite
  GVL.openSaveDialogConfirm :=GVL.dialogMan.GetDialog('Dialogs.ConfirmDialog'); // Get the reference to the FileOpenSave dialog
  (*Checkifthedialogexist, ifsotrytoopenit*)
  IFGVL.openSaveDialogConfirm<>0THEN
    GVL.visuRect :=ADR(GVL.pClientData^.rClientRect);       Â
    xResult :=GVL.dialogMan.OpenDialog(GVL.openSaveDialogConfirm,ADR(GVL.pClientData),TRUE,GVL.visuRect);
  END_IFEND_IF
All references to the objects are set, the variable xResult becomes true but the dialog is not displayed.
I have no clue because the documentation is missing, can you help me?
Thank you,
Massimo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Originally created by: Massimo.Milluzzo
Hi all,
I'm trying to open a custom dialog in my project (Codesys 3.5.9.30) without success.
I created a "Visualization" set as dialog with a couple of buttons and a rectangle with text.
In my main page, when the user click a button, I have to perform some operations and then, if the operations are completed, I need to open this dialog.
I tried with this code:
All references to the objects are set, the variable xResult becomes true but the dialog is not displayed.
I have no clue because the documentation is missing, can you help me?
Thank you,
Massimo
Take a look here l viewtopic.php?f=25&t=7385 l
You can open dialog for each "logged" users on certain application event
Originally created by: Massimo.Milluzzo
Yes, you copied the example from codesys store; I did the same thing.
Actually my question becomes: why should I use OpenDialog4? What are the other three functions used for?
Here is simplified
dialog1.rar [54.07 KiB]
Originally created by: Massimo.Milluzzo
Thank you