DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you Populate ListBox with Channel Group Name Dynamically?

Solved!
Go to solution

Hi Hannah,

 

That code looks like it is designed to populate an enumeration pull-down control or a list control in a SUDialog.  Are you trying to run that code in the SCRIPT panel as a DIAdem script?  If you are using a SUDialog, could you post the *.sud file so we can take a look at it?  Perhaps the issue is a control name mismatch or something.

 

As a SUDialog enum/list control populating script, it looks OK to me.

 

If you're trying to run this code in DIAdem script, then what are your goals for it?  You can use a Data.CreateElementList to do something similar in DIAdem to the list control in a SUDialog, just without the user interface element.  What are you wanting to accomplish here?

 

 

Dim listNum, selectData
Set selectData = Data.CreateElementList()
FOR listNum = 1 TO GroupCount
  Set Group = Data.Root.ChannelGroups(listNum)
  Call selectData.Add(Group)
NEXT

 

 

Brad Turpin

Principal Technical Support Engineer

National Instruments

0 Kudos
Message 11 of 11
(223 Views)