Proper Data folder and path management
Dolbash
I've been using igor 6.37 for about 2 years now and have been getting slowly better at stuff.
Today I have a question regarding data folders. Whenever I create a procedure, I usually have various stages of the procedure create more waves derived from teh original one. I then have these waves moved into various new data folders, and then when the procedure finishes all of the new waves in their new folders are moved into a parent folder within root. Something like this root:Parentfolder:foldercontainingwaves. In other procedures I want my procedure to look within foldercontainingwaves at those waves and perform actions upon them. My common solution is for the user to have to input the full path as a string (Eg. "root:Parentfolder:foldercontainingwaves") but this can get cumbersome and error inducing if A. the user enters the name wrong and the program exits with an error, or B. The user doesn't know the exact full path.
My question is twofold.
1. is there a way to prompt, with the dropdown menus, the user to just pick a folder without having to enter it in as a string by hand
2. is there a way to re-prompt the user if the TYPED in folder doesn't exist
Thank you in advance
2. Use DataFolderExists to test if a user-provided data folder exists. If not, then go to step 1 (have the user pick the data folder)
March 9, 2018 at 09:01 am - Permalink
March 9, 2018 at 09:06 am - Permalink
An example experiment is available from: Files > Example Experiments > Programming > WaveSelectorWidgetExample
March 9, 2018 at 10:20 am - Permalink