For the path input of the List Folder, as of right now I created a constant on the block diagram and specify the folder address ( Refer to my screenshot for the error question). If I create a control, when I run the VI, it will prompt me to select the folder which contain the png images but I can't select the folder and instead I must select one of the images in it and when I did that, it returned me an error. So what must I do to allow the VI to prompt the user to select the folder that contain any png images and it would then display all the png images in the folder on the picture indicator.
How do I configure it so that the files passed into the array would be the first file in the folder follow by the second, the third till the last file in the folder and not randomly?
How do you define what is the first file in the folder vs. the 2nd vs. the 3rd? It seemed to give me an array of filenames that were in alphabetical order.
I save the files in the folder as Graylevel 30, Graylevel 45 to Graylevel 255 so how do I configure it so that it will read the Graylevel 30 file first before the Graylevel 45 so on and so forth.
Unfortunately, what you want is numerical order which is not the same as alphabetical order.
If you cold rename your files as Graylevel 030, 045 and 255, then alphabetical order will be the same as numerical order.
If you can't name the files differently, then what you could do is go through your array of names and rename the strings there to add the extra digit. Then do a sort 1-D array to get the alphabetical order (and thus numerical order). Then go back through that array and make the strings go back to their original names.
Could you show me an example on how I could go through my array of names and rename the strings there to add the extra digit. Then do a sort 1-D array to get the alphabetical order (and thus numerical order). Then go back through that array and make the strings go back to their original names.
This is what I currently have.
it seems to me all you do is asking other people to do your own work...
fredteng wrote:This is what I currently have.
And you just present my snippet with the only extension by a path constant...
To change the filenames you have to parse the string into it's parts, change the parts and rebuild the string. Functions for that can be found in the string palette...
(Just an example, there are other possible ways. Just think of the GetFileExtension.vi...)