10-28-2016 08:38 AM
Is it possible to programmatically retrieve a list of all the available values from an IOName (or more specifically IVILogicalName in this case) control? I'm talking about the list of values which shows up when you click the drop-down menu arrow of the control. For example, if I set the control to NI-SCOPE (Select IVI Class->IviScope->niScope) the drop-down list only shows the names of scopes that are present (e.g. "PXI2Slot6"), including any "duplicate" sessions (e.g. "PXI2Slot6 (1)").
I can get the currently selected value of the control easily enough but I'd like to get a list of all the available values. Is this possible? The values are right there in the control so surely there must be a way to access them.
My ultimate goal here is to find a way to retrieve all open IVI sessions and then close them. If there is an alternative way to achieve this, I'd be glad to hear it.
Some related posts I've found:
https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Close-all-open-IVI-sessions/td-p/1752560
https://forums.ni.com/t5/Digital-Multimeters-DMMs-and/What-is-the-proper-way-to-close-all-open-sessi...
Solved! Go to Solution.
10-31-2016 11:02 AM
DropDownList (with VI scripting turned on)
I use this to find niDMM you can edit it to work with niSCOPE by changing the
IVI class of the output array
I use this for VISA
10-31-2016 11:18 AM
Here is a collections of VIs that I use when dealing with niDMM IVI refnum to clean up orphans. Mainly while developing and debugging when I might abort running code.
11-01-2016 04:09 AM - edited 11-01-2016 04:10 AM
@Omar_II wrote:DropDownList (with VI scripting turned on)
I use this to find niDMM you can edit it to work with niSCOPE by changing the
IVI class of the output array
Thanks, this works beautifully. 🙂
11-02-2016 04:24 AM
Just out of curiosity, how were you able to select this "DropDownList[]" property for the property node? When I create an IVILogicalName property node from scratch, there is no "DropDownList[]" property available in the Select property->Browse menu. Copy/pasting the property node from the example posted above works fine, but even with that one, if I change the property to something else there's no way to change it back to "DropDownList[]". Is there some toolkit requirement for this?
11-02-2016 07:57 AM - edited 11-02-2016 08:08 AM
I'm not sure which one turns it on but it is either
Options/VI Server VI Scripting
"Show VI Scripting functions, properties and methods"
or it is the LabVIEW.ini file setting
SuperSecretPrivateSpecialStuff=True
Since the node is brown it must be in the SuperSecretPrivateSpecialStuff
WARNING use at your own risk for it is not officially supported by NI and might change with new versions.
11-02-2016 08:07 AM
I see. The VI scripting option was checked but that super secret .ini value is news to me. I'll try setting that as well. Thanks again.