joergherzinger Posted February 24, 2014 Report Share Posted February 24, 2014 Hi, I am currently using OpenG to read an INI file into a big cluster (with subclusters), split that one up and save the subclusters into shared variables. Not this is ok, although it is very static. Now what I am trying to achieve is splitting the sections of my INI files into separate files. For simplicity the file name should be the section name and so on. The problem is that clusters are extremely static and I can't get anything to work. The perfect thing would be something like the attached. Pass a directory and a cluster to a subvi, get the cluster with values from INI back. The file name would be constructed from the cluster name. Is this possible at all? Quote Link to comment
chris754 Posted February 24, 2014 Report Share Posted February 24, 2014 Check out "List Folder.vi" in the Advance File Function palette. This will get you all folders/files in a directory. So once you built the directory path you could loop through all the INIs. Quote Link to comment
joergherzinger Posted February 24, 2014 Author Report Share Posted February 24, 2014 Check out "List Folder.vi" in the Advance File Function palette. This will get you all folders/files in a directory. So once you built the directory path you could loop through all the INIs. Well, reading all files in a folder is easy, the problem are the clusters! How can I pass the correct cluster to OpenGs read ini vi? I tried a lot and in the end I always fail because clusters are so extremely static. Quote Link to comment
ShaunR Posted February 24, 2014 Report Share Posted February 24, 2014 the problem are the clusters! How can I pass the correct cluster to OpenGs read ini vi? Use the OpenG variant config to save the clusters to a normal ini-file then run this on it (you might want a little more error checking). Split-Ini.vi Quote Link to comment
hooovahh Posted February 24, 2014 Report Share Posted February 24, 2014 Well, reading all files in a folder is easy, the problem are the clusters! How can I pass the correct cluster to OpenGs read ini vi? I tried a lot and in the end I always fail because clusters are so extremely static. Clusters being static is by design. If you data type is flexible at run time then you don't want a cluster you want a variant (which may or may not be a cluster). But at some point you need to know what you are dealing with. Quote Link to comment
chris754 Posted February 24, 2014 Report Share Posted February 24, 2014 Oh, I see, I misunderstood your problem. Quote Link to comment
joergherzinger Posted February 25, 2014 Author Report Share Posted February 25, 2014 Use the OpenG variant config to save the clusters to a normal ini-file then run this on it (you might want a little more error checking).Split-Ini.vi Well, this did not really solve my problem, but it gave me the idea to use it the other way around. This is really really ugly, but I am creating a single ini from all other inis in the directory and use that one to read it into my config cluster. Thanks... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.