08-08-2019 06:13 AM
is it possible for you to put the images at least with labels??
08-08-2019 06:34 AM
This is the way I find these VIs on my machine...
08-08-2019 07:17 AM
It's a VI Snippet, you can drag it and drop to the Block Diagram to get the code, then unhide labels.
Moreover, right clicking on any node, you can discover what's its parent palette.
08-08-2019 10:55 PM
Hi Guys
I pretty much got what you guys are suggesting but what should be the path of that .ini file?
And I don't want to select the path when I create Executable. What constant path should I use so that it will automatically read .ini file keys and configure itself when I include this .ini file while building Executable(usually it will appear with .exe file) but while coding how to make it use this included file?
Hope You got my point.
Thanks And Regards
Baig
08-09-2019 02:00 AM
a) add a custom destination and copy your ini file therein; an example of custom destinations:
b) choose a directory, as in my previous example; when your program starts, if the ini file does not exist, create it using the Config Files VIs (create also the directory tree if needed)
08-09-2019 03:21 AM
Hi,
since several years we have the function GetSystemDirectory in the file constants palette.
Using this function you could get the folder path of
AFAIK Microsoft is recommending the 1st and 2nd folder in this list as data storage for your application. Each user has write access to these folders…
08-09-2019 05:38 AM
@pincpanter exactly, thank you for the example.
/Y
08-09-2019 07:04 AM
Hi Pincpanter and GredW,
Thank you so much for this information.
I am extremely sorry for so many questions but i am new to this and
a) I got your idea of adding custom destination for needed *.ini file but I will have to install this application(when done) in other systems so will that *.ini file automatically go to this custom destination when we install from Installer.exe??
b) Again with this also does not it look for the *.ini file (OR need to specify the specific location again with path build and required *.ini file might not be there in this location in different systems(PC).
Thanks and Regards
Baig
08-09-2019 07:52 AM
Hello Baig,
you are right, a) requires an installation of your *.exe on a new machine. With b) you are more flexible, since you hard-code the location into your program.
You can very easily check for presence of the *.ini - file, look at the snippet:
Btw. why doesn't work the snippet of pincpanther on my system (LV2019 32bit) ?? Am I the only one?
08-09-2019 08:10 AM
@mabaig wrote:
a) I got your idea of adding custom destination for needed *.ini file but I will have to install this application(when done) in other systems so will that *.ini file automatically go to this custom destination when we install from Installer.exe??
b) Again with this also does not it look for the *.ini file (OR need to specify the specific location again with path build and required *.ini file might not be there in this location in different systems(PC).
a) That depends on your program. 🙂 I usually do a check if the file exists and if not create a default setting file. Another option is to have an ini-file in your project and have it copied there through the Installer.
You can set the Open config file to "create if not found". You'd still have to handle the empty/default case though, but that should be easy enough.
b) see a)
/Y