From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Right click custom controls cannot select aliases

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.

0 Kudos
Message 1 of 3
(6,364 Views)

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.

 

20187i9628EBB580C1C71E

 

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.

Jarrod S.
National Instruments
0 Kudos
Message 2 of 3
(6,360 Views)

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.

 

 

0 Kudos
Message 3 of 3
(6,341 Views)