07-28-2010 04:31 PM
Hello,
I've noticed that the right click custom indicators/controls framework as downloaded from http://zone.ni.com/devzone/cda/tut/p/id/9346 do not work with aliases. Aliases show up with an empty bullet instead of a selectable solid bullet. Is this just a minor bug in terms of which channels are made selectable, or is there a more fundamental reason why aliases cannot be used? I would really like the right click controls/indicators to work with aliases. Thank you.
07-28-2010 10:00 PM
Is there a particular control you are referring to? I think the issue may boil down to the fact that some of these controls created their own channel selection dialogs, and these dialogs do not recognize that aliases are selectable objects.
You can see the core portion here that populates the tree checks for each node the IsChannel property.
The issue is that an alias is not a channel, so this returns false. You could extend this check to allow alias selection by also checking if the node's Type field matches this value: 2c11e122-dad9-44da-989c-a66ff203fa31. Type is another field in the same cluster. This GUID represents the Type value of an alias in the system. So the proper check might be (IsChannel=True OR Type = 2c11e122-dad9-44da-989c-a66ff203fa31).
The rest of the control will hopefully work just fine with the selected alias, because the VeriStand Execution API itself these controls call into support aliases. One issue is that you can't tell if the alias is boundto a writable channel or not. If the alias you select is bound to a read-only channel, you will get an error trying to call a SetChannel function with it.
07-29-2010 06:17 PM - edited 07-29-2010 06:18 PM
Hi Jarrod,
Thanks for the tip. I do have a couple of followup questions as I'm not clear as to how far I should propogate the "or" through.
In the Channel Selection Dialog (All Channels) VI, do I need to feed the "is channel or type ID" through to just the button true/false selector only, or also to the "Child Only?" property and also the Get System Node Children VI?
I have the same question for the Channel Selection Dialog (Writable Channels) VI as well as in how far should the "is channel or type ID" be propagated through? In addition is the Channel.Writable field even valid for an Alias?
I am feeding the "or" output to all of these now. For some reason the alias becomes selectable (with solid dot) only on the very first attempt. The subsequent calls of the channel selection dialog shows restores them as a clear dot (unselectable). Are there other VI's that need to be changed?
Thank you.