DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Interaction, View with SUD

Hello,

my plan is to create a view sheet with integrated dialog (as you can see below). What i would like to have is, that when the user klicks on the Button "Goto", a Interaction starts (InteractionOn) so that the user can select a point in the diagramm. My problem is to combine InteractionOn with the Button klick event?! Interaction should not start until the user klicked on the Button.

 

My second question: Is there a easy way to go somewhere backwards in a program, or e.g. go back to main-menu (dialog)  or "start"

 

Thanks a lot

 

Unbenannt.PNG

 

 

 

0 Kudos
Message 1 of 8
(6,285 Views)

Hi AndiMEC,

 

If you embed a SUDialog into your VIEW layout, you do not need InteractionON.  SUDialogs embedded in VIEW layouts are always non-modal, so they do not ever interfere with the user making selections in VIEW areas, such as moving the graph cursors.

 

I'm not sure what you mean by "going back to main dialog".

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 8
(6,255 Views)

Hello Brad_Trupin

thank you for your answer,i was just thinking to complicated, but you gave me the right hint for my "Goto" problem

 

For my second issue; I'm starting Diadem with my own script, first is a Dialog (main Dialog) where the user can make different settings and "start corresponding programs". What i meant is a way to got back to main Dialog or go back to a further program step, preferably with a button in SUD like the "Goto" issue, so that the user can adjust his settings.

 

Thanks a lot

0 Kudos
Message 3 of 8
(6,239 Views)

Hi AndiMEC,

 

You can call SudDlgShow() from within the callback code of a SUDialog.  As long as SUDialogA is calling SUDialogB and not itself, that works just fine.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 8
(6,223 Views)

Hi Brad_Turpin,

i think in my case it's a bit more difficult. First i'm not quite shure if get right what you mean with "callback code of a SUDialog" ?!

 

In my matter I'm starting a Script (main script), in this script at the beginning i call my "main" dialog with Suddlgshow(.....,oDlgVar), then the user makes some settings and after that klicks on a button to start one of some different "evaluation programms" -> transfer back to main script, where the evaluation codes are in subroutines (better performance than in Dialog) -> show results (view with SUD)

 

 

Call Main
Sub Main
Call Suddlgshow("Dlg1",sPathDocuments & "MainSUD.SUD",oDlgVar)
  If DlgState="IDOk" then  
  If oDlgVar.bstart1 then
  Call Program1
  Elseif oDlgVar.bstart2 then
  Call Program2
  ...
  End if
  End if
End Sub

Sub Program1
...
End Sub
Sub Program2
...
End Sub

 

What I'd like to have is the opportunity to "go back" to "main" Dialog preferably with a button in View with SUD, so that the user can start a different programm or change settings.

I appreciate every idea or suggested solution for my issue

 

Thanks a lot

 

0 Kudos
Message 5 of 8
(6,182 Views)

Hi AndiMEC,

 

I'm confused.  Your posted image clearly shows a VIEW area with an embedded non-modal SUDialog that has two buttons on it and never ends.  Your posted VBScript code clearly shows calling a modal SUDialog that executes and then ends.  I don't know what you mean by the "main dialog".

 

The SUDialog callback functions are the events that trigger code you've put into the SUDialog to customize behavior.  What should happen when the user clicks on those 2 buttons in the VIEW area?  That's the callback code that will run, when the user clicks on the buttons.  You have to create that code yourself and attach it to the button press event of each button.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

 

0 Kudos
Message 6 of 8
(6,171 Views)

Hi Brad_Turpin,

 

with "main" dialog i mean my starting dialog (as you can see in the code above)

Call Suddlgshow("Dlg1",sPathDocuments & "MainSUD.SUD",oDlgVar)

After executing a selected program (by the user in my "main/starting" dialog"), VIEW with SUDialog (as you can see on top) is shown.

Waht I now mean is that the user can "go back" to my main/starting dialog after klicking on "Back" Button to maybe adjust some settings or start another program (my main/starting dialog shows different program opportunities)

 

Thanks a lot

 

 

 

 

0 Kudos
Message 7 of 8
(6,166 Views)

Hi AndiMEC,

 

OK, I think I understand now.  It sounds like you want to put another Call SudDlgShow() command behind the "EventClick" event of the "Back" button in the VIEW area.

 

You can double-click on the "Back" button in the SUDialog Editor to jump to the "EventClick" callback function where you can add the Call SudDlgShow() command.  Then resave the *.sud file and relink the *.sud file to the VIEW area.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 8 of 8
(6,148 Views)