08-02-2006 08:04 AM
08-02-2006 08:16 AM
Is this for a specific cluster or do you want to make a generic toString function? for a specific cluster I would suggest unbundeling by name and typecasting to string and append or just use a string formatter. For a generic solution you could make the cluster an array and then for each item in a loop typecast or format the element to a string and append using a shift register.
Paul
08-02-2006 08:19 AM
I forgot the data type if you stick to your original solution is to use the property node (GObject) has a classID interger value specifying the type. There are vary many types in labview so I dont use case structures with data types often.
Paul
08-02-2006 08:39 AM
"solution is to use the property node (GObject) has a classID interger value specifying the type."
That works right up till you have a complex cluster of clusters or an array of clusters.
At that point you will have to resort to "trial and error" using the "to more specific" node and monitoring the returned error cluster.
But even this approach requires the code "know" about every cluster type so it has an associated property node.
Another approach use the "flatten to string" but parses the type descriptor to preceed.
See the LAVA scripting forum for un-supported methods. I have used those techniques to develop LV2 globals given the path to a /ctl of the cluster.
Ben
08-02-2006 08:56 AM