07-25-2012 04:28 AM
As it says in title. Im trying to get the group index number from the user having selected a channel. The ChannelNameGet also relies on you knowing the group index, any help here would be greatly appreciated!
Many thanks
Dan
Solved! Go to Solution.
07-25-2012 09:32 AM
Hi Dan -
If you're using a relatively recent version of DIAdem, just use the object-oriented structure of the Data Portal:
Data.GetChannel("Channel_Name").ChannelGroup.Properties("index").Value
...where "Channel_Name" is your channel's name. If you use the above line of code literally, then make sure your channel name is unique - otherwise you'll need to provide a group name as well (e.g. "Strain/Channel_1") to the parameter being passed to the GetChannel() method.
07-25-2012 09:44 AM
Many thanks Derik this was exactly what I needed!
Dan
07-30-2012 11:28 AM
Hi All,
For completeness, if you're using a creepy-old version of DIAdem that doesn't support channel objects or you're stuck with legacy code that uses channel names or channel numbers instead, you can still get the group index of a channel with the ChnGroup(ChannelNameOrNum) command.
Brad Turpin
DIAdem Product Support Engineer
National Instruments