cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

2d array to cluster array How do I insert a 2d string array into a cluster array?

¡Resuelto!
Ir a solución

I have a cluster with 4 string elements 3 are string constants and 1 is a string combo box.

I can save the cluster array to file without any issues. 

Now I want to read the saved file back in the cluster array.

How do I insert a 2d string array into a cluster array?

 

 

0 kudos
Mensaje 1 de 12
6.779 Vistas

ofcourse, this is a 1D...you can maipulate to 2D and use a 'for loop' to index individually

 

Example_VI.png

 

 

2D....

Example_VI.png

0 kudos
Mensaje 2 de 12
6.770 Vistas
Solución
Aceptado por el autor del tema rcard53762

@rcard53762 wrote:

I have a cluster with 4 string elements 3 are string constants and 1 is a string combo box.

I can save the cluster array to file without any issues. 

Now I want to read the saved file back in the cluster array.

How do I insert a 2d string array into a cluster array?

 

 


It would be helpfull to have an example of what the actual cluster array look like with typical data. A way to do this is by saving the content of the cluster array as a configuration file (extension .ini) and then use the OpenG Variant Configuration File VIs to save and retrieve data to/from the configuration file. You can get these VIs from the VI Package Manager.

 

Here is an example. Also attached is the generated config file.

cluster array.png

 

Ben64

0 kudos
Mensaje 3 de 12
6.745 Vistas

Thanks for the help.

0 kudos
Mensaje 4 de 12
6.713 Vistas

writing the cluster array to config file is working fine .but when i read it,i am getting null string cluster array .

when i check the config file actual data is present,but reading config file giving me an null string.

0 kudos
Mensaje 5 de 12
6.661 Vistas

Make sure that the Section and Key inputs are the proper name.  You can verify that by using the Get Key and Section Names VIs.

 

You can also wire something to the "default value" which will be the output if it the key does not exist.

 

Also this Discussion Thread has been marked as solved, therefore you might get a better discussion by starting a new thread specifically regarding your issue with reading the config file.

 

Regards,

M. Whitaker
ni.com/support
0 kudos
Mensaje 6 de 12
6.636 Vistas

@venaktesh wrote:

writing the cluster array to config file is working fine .but when i read it,i am getting null string cluster array .

when i check the config file actual data is present,but reading config file giving me an null string.


You need to show us how you are writing the file and how you are reading it back. Please attach some code.

0 kudos
Mensaje 7 de 12
6.630 Vistas

Here,i have attached my code for both writing and reading config file along with written config file.

0 kudos
Mensaje 8 de 12
6.614 Vistas

These are images, not code. Please attach the VIs instead. Thanks.

0 kudos
Mensaje 9 de 12
6.607 Vistas

Did you set the constant labels of the the Account info Cluster to be the same as in the file (Name, Designation, DOB ...)? Also, I don't think you can put a space in a key name (as in EMAIL ID). Replace the space by an underscore (EMAIL_ID)

 

Ben64

0 kudos
Mensaje 10 de 12
6.584 Vistas