I'm developing an Automation plugin that holds some extra data about spot channels. When I get the event that a new spot channel was created, I use the following line of code to get its ID:
err = PIUGetInfo( classChannel, keyID, &channelID, NULL );
I use the channelID value returned as a key for the dictionary that holds my extra data.
When one of my spot channels is duplicated by the user, I need to duplicate my extra data as well. But I'm only able to find out the ID of the new channel, and not the original channel that got duplicated.
For example if I have a channel with a keyID of 2 then duplicate it, I can read out of the event that the new channel has a keyID of 3. I can't find a way to get the original channel's ID of 2 anywhere.
That means I can't figure out which item in my extra spot channel data I need to duplicate and apply to the new channel.
When I look at the log from the Listener, I see that an item of typeOrdinal, enumTarget got duplicated. I take that to mean that the current selection was duplicated, which happened to be a spot channel. Can I find out what the selected channel's ID is?
Thanks for any help you can give me. -- Mike