12-15-2010 05:21 AM
Hello,
In Diadem, I am developing a GUI using VBScript and at one moment the user must be able to modify some values of a certain channel. I am wondering if it is possible to show this channel in a window as it is shown in the View section of Diadem. Thus, the user modifies the values, and then continues with other operations. Any suggestion is welcome.
Thanks!
12-15-2010 08:20 AM
Hi Ovidius,
Yes, you can accomplish something like that in a SUDialog, but DIAdem doesn't make it super easy. You should use the SUDialog XTable control for maximum efficiency or alternatively the regular table control for the easiest programming experience.
If you'll post or email me an example data set (with a representative file size), I might have a chance to send you an example of the XTable approach.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
12-15-2010 08:25 AM
Hi Ovidius,
Another option would be to programmatically set up a VIEW sheet with the channel or channels you want to the user to edit in the VIEW table and let the user edit those values directly in VIEW.
For several versions now (since DIAdem 11.0?) we've had the ability to create non-modal SUDialogs that remain active even while the user is clicking around in DIAdem.
Of course, if the data channel in question has only 10 values, a simple table in a SUDialog would be easy enough to arrange, and you may want to lead the customer directly from task to task with a modal SUDialog. I'm just presenting options for you-- I don't yet understand your full use case.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
12-16-2010 03:01 AM
Hi Brad,
I would like to know how can I set up a View sheet with a certain channel(s). Thank you!
12-16-2010 10:17 AM
Hi Ovidious,
This should get you started;
Call View.NewLayout Set Sheet = View.Sheets.Add("Edit Table") Sheet.Areas(1).DisplayObjType = "ChannelTable" Set Table = Sheet.Areas(1).DisplayObj Table.HeaderItems.Remove("Number") i = Table.HeaderItems.Count Table.HeaderItems.Add("Maximum") ': Table.HeaderItems(i+1).Format = "d." Table.HeaderItems.Add("Minimum") ': Table.HeaderItems(i+3).Format = "d." ReDim ChnArray(4) ChnArray(1) = CNo("Example/Time") ' write the channel number in ChnArr() ChnArray(2) = CNo("Example/Speed") ' write the channel number in ChnArr() ChnArray(3) = CNo("Example/Revs") ' write the channel number in ChnArr() ChnArray(4) = CNo("Example/Torque") ' write the channel number in ChnArr() Call Table.Columns.Add(ChnArray) Call WndShow("VIEW")
Brad Turpin
DIAdem Product Support Engineer
National Instruments