DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Get a group's index by knowing its name

I notice that there have been a number of changes to function behaviour such that referencing groups by their names has become increasingly difficult.

 

I have data files that may include a group whose name I know but not its index. ChnAlloc used to allow you to place a channel in a particular group without having to know the index of that group. Thus I could easily place new channels into my group whose name I knew but whose index I didn't. Now I can't do that.

 

Instead I need a way of determing the index of a group by its name. This should be easy and I can't for the life of me understand why there are so many ways of obtaining information about channels but not groups. Surely it would make sense to have a variable called GroupNo("Group Name")?? I considered using GroupPropValGet and asking for the group's index number but I can't because this function requires you to use the index number to specify the group in question.

 

Will I have to go to the lengths of writing a loop that passes through each group name and checks whether it matches the name I'm after??

 

Cheers,

 

Si.

 

0 Kudos
Message 1 of 4
(5,424 Views)

Simon,

 

can you please provide some additional information:

- What version of DIAdem do you use?

- What did make working with groups moe complicated than it was before ? Can you please provde an example ?

 

Andreas

0 Kudos
Message 2 of 4
(5,410 Views)

Hey Simon,

 

I use this in my code to get the group reference number from the group name...

 

Dim GrpName ' name of group

Dim GrpRefNum ' Group reference number

GrpRefNum = GroupIndexGet(GrpName)

 

Good Luck

--matt

 

 

Message 3 of 4
(5,406 Views)

Hi Matt,

 

Thanks! How did I not find that.....

0 Kudos
Message 4 of 4
(5,398 Views)