취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

extracting array of labels in a cluster

How can I extract an array of strings, containing the label of objects in a cluster?

Thanks,

LV 8.6 on Windoze XP
0 포인트
1/14 메시지
9,911 조회수
Use a reference to the cluster and a property node. If the cluster can contain other clusters and you want the names of the objects in those subclusters, things can get messy fairly quickly, but it can be done. Open G may have some tools for this, but I am not sure.

Lynn
0 포인트
2/14 메시지
9,906 조회수
I I hear what you're saying.  The problem is I haven't found where the labels if the children objects are hiding.

Can you please tell me where to look and how?

Thanks
LV 8.6 on Windoze XP
0 포인트
3/14 메시지
9,886 조회수
Here is a VI I put together to explore access to all the controls on a panel. I need to change the captions (not the labels) programmatically for language localizations. Both language versions of each caption may be stored as diagram constants, or, more flexibly, in a configuration file. This VI is not documented and has a lot of rough edges as I did not plan for anyone but me to use it and only as a learning tool. LV8.20.

Lynn
4/14 메시지
9,874 조회수
Assuming you're using LabVIEW 8.2, try this VI, which makes use of the Variant VIs introduced in LabVIEW 8.2 (OpenG provides a similar VI).  Convert your cluster to a variant and then wire it into this VI.  The outputs are:
1) an array of strings containing the names of all the child clusters
2) an array of integers, which are indices of the parents of each child cluster
3) an array of strings containing the names of all final child elements
4) an array of integers, which are the indices of the parents of each final element
5) an array of enumerations corresponding to the type of each final element

I use this in a number of situations, including a VI that can populate a tree control to match a cluster, which I'd be happy to post too if that's of use to anyone.
0 포인트
5/14 메시지
9,867 조회수

Hello nathand,

 

is it possible to do the reverse, that is to say from a

nested variant tree, cast it into a cluster an bundle

it into another existing cluster ?

 

David Koch

0 포인트
6/14 메시지
9,054 조회수

I don't think there's a single VI that does what you want, but the OpenG Variant tools might provide enough help to make it possible to build one. There are tools there for building a cluster from a Variant, which basically build up a flattened string representation of the cluster which you can then unflatten.

0 포인트
7/14 메시지
9,031 조회수

Hello Labview Super Sayian, could you please check my

proposed solution here :

 

https://forums.ni.com/t5/NI-TestStand/Enqueue-Teststand-cluster-to-Labview-return-a-cluster-by/m-p/3...

 

It is still a WIP though...

 

David Koch

0 포인트
8/14 메시지
8,958 조회수

@Kochise wrote:

 

is it possible to do the reverse, that is to say from a

nested variant tree, cast it into a cluster an bundle

it into another existing cluster ?


I'd like to see an example of what you are thinking, but I think my XNode posted here could be a start to making this work.

0 포인트
9/14 메시지
8,865 조회수

Hello Hooovahh, thanks for the feedback.

 

Here's my current progress, I'm blocked

though.

 

The idea is to recreate a nested variant

from any input (cluster elements or from

a PropertyTree incoming from Teststand)

and cast it using 'VariantToData'.

 

Please refeer to the related topics :

 

http://forums.ni.com/t5/NI-TestStand/Enqueue-Teststand-cluster-to-Labview-return-a-cluster-by/m-p/30...

http://forums.ni.com/t5/NI-TestStand/How-to-use-LabView-s-created-notifiers-in-Teststand/td-p/305986...

http://forums.ni.com/t5/LabVIEW/Convert-Labview-cluster-name-to-Teststand-container-name/m-p/3067857

 

David Koch

모두 다운로드
0 포인트
10/14 메시지
8,838 조회수