08-25-2010 08:51 AM
Hello everyone,
As mentioned in the title I am trying to build a cluster from two one dimensioned matrixes of the same size, one containing the name and the other containing the values have tried using the array to cluster function and modifying the names of the elements pragmatically but I get the 1073 error code " This property is writable only when the VI is in edit mode, or this method is available only when the VI is in edit mode."Is there a way to do this or am I trying in vain?
Thanks.
08-25-2010 09:04 AM
Hi fixxer,
as long as you try this in a running application, you're trying in vain...
The names are part of the cluster datatype definition. Datatypes can only be changed in edit mode as LV needs to recompile all structures accessing that datatype...
But you can open a different VI using the VI server, change a cluster in that VI and save the VI afterwards. The different VI only has to be in edit mode
08-25-2010 09:07 AM
You cannot change the cluster at run-time because that's effectively asking an application to change itself, and this is not allowed.
A cluster will be of fixed size. Is there some reason why you're trying to change the arrays it into a cluster? Where is this data going?
Also, the sequence frame is completely unnecessary in the code.
08-25-2010 09:15 AM
I am trying to change the arrays into a cluster because I have to compare some of the values in the matrix to other defined values later on so I thought it would be easier to do that using the unbundle by name function rather than using the array subset function or delete from array one.(The matrixes are composed of 120 elements each and I have to retrieve 32 non-successive elements from it for later comparison).
08-25-2010 09:19 AM
Well, yes, Unbundle By Name would be easier, but unless you basically create a new VI as Gerd alluded to, you can't do what you want to do. As for using Array Subset or Delete From Array ... what's wrong with Index Array? You can index out the elements you want using a for-loop:
08-25-2010 09:39 AM
Yes haven't really thought of that.Thanks.I'll try it.