DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog Box Retain Entries

Solved!
Go to solution

Hi Everyone,

 

I've created a script and dialog box for people in my office to use. I intend for people to take what I have created and save it on their computer that way the master copy never gets messed with. In this dialog box the user has to enter a number of variables and test parameters which I have saved as variables such as L1, T1, R1... etc. Is there a way that when you close diadem and reopen data from an old test that you can repopulate the dialog box with entries that were previously entered. Right now everthing resets to 0 if you completely close Diadem. Seeing as how there are a number of fields you have to enter it would be quite annoying to have to refill this every time. I'm currently using Diadem 2015. Unforunately I do not think I can provide this code and dialog box to you guys so hopefully this is clear enough.

 

Thanks for any help

0 Kudos
Message 1 of 3
(3,353 Views)

So it was wrong of me to use diadem variables such as L1, T1... etc since those will reset on each instance of Diadem. Would something like user variables be the answer here? I haven't used them before so I am unsure if that is the correct way to go. Perhaps there is a better method to retaining values than.

 

 

0 Kudos
Message 2 of 3
(3,329 Views)
Solution
Accepted by topic author OperatorJack

So I found a solution to my problem. The way I solved the problem and was able to keep the values in the in dialog box was by using global dimensions and creating a channel to store these values.

 

If groupindexget("VariablesV2") = 2 then          'happens when there is a variable channel


   GlobalDim1 =  CHDX(1,2)
   Call SUDDlgShow("Dlg1",MyFolders(0)&"NoName.SUD",NULL)
   ChD(1, "VariablesV2/TestVarChanName") = GlobalDim1


 else                                            'happens when there is NO variable channel


  Group = "VariablesV2"
  Call GetCreateGroup(Group)
  TestVar1 = GetChannel("TestVarChanName", 1, "Numeric", Group)
  Call SUDDlgShow("Dlg1",MyFolders(0)&"NoName.SUD",NULL)
  ChD(1, "VariablesV2/TestVarChanName") = GlobalDim1
 
End if

 

 

Basically what it does is checks to see if the variable group is present as the second group. If it is not then it creates the group and then creates the channels I need. I then call the dialog box where I can enter values in my text box that have variables "GlobalDim1" assined to it. I then store this value in the channel I just created. When I reload Diadem, the script will see this channel, open the dialog box and display that value, and I can then choose to edit this value or leave it be. I'm not going to say it's the best way to do it but so far it works. I'll see how it performs when I have a long list of variables/channels.

Message 3 of 3
(3,322 Views)