Hello,
I would like to analyse dynamically and recursively the content of a variant objects.
For the moment, the Variant content analyse is quiet "low level", and not very userfriendly, with type casting, integer comparisons without enumerate values ... and so on ... 
This kind of Variant analyse library has been made by JKI in their tools
. ... But are all cases threated ? ... what about evolutions ? 
It would be nice to add such a kind of API directly into LabVIEW, complient with all existing types, and with evolutive behaviour according to new LabVIEW versions. 
It should also be nice to create enumarate values to be abble to easily know what is the content of a variant.
These functionnalities already exits with object references ... but variant has sometimes a more "dynamic behaviour " !
Here is a short, but certainly not complete list, of desired functions : (In a textual description way)
- enumObjectType { cluster, Array , numeric , string , ... } : List of all kind of objects
- function getOjectType( object as variant ) as enumObjectType : Gets the type of a variant
- function getObjectLabel( object as variant ) as string : Gets the label of an object
- function getObjectCaption( object as variant ) as string : Gets the caption of an object
- function getObjectValue( object as variant ) as variant : Gets the contained value
- function getObjectContent( object as variant ) as variant [] : Gets an array of variant objects contained in the aggregate object passed as parameter
- function getObjectAtIndex( object as variant , index as int ) as variant : Gets a element of an array at the specified index
- ...
- function setObjectValue( ...
- function setObjectCaption( ...
- ...
With such a kind of library, it would be simple to create powerfull, dynamic tools !!!
To make a comparison with TestStand, i like very much the API which give the ability to analyse and modify recusively the content of a "PropertyObject". (Very complete and open API
, Thanks TestStand staff !)
Thanks.
Manu.net.