11-12-2012 03:11 PM
Is there a way that I can allow a user running a code compiled under LV2011 to adjust their temporary directory? This is the path that is returned by the Temporary Directory Function.
In an older version of the code, which was built under LV6.1, the user could pull down the following menus: Tools/Options/Paths. But that menu selection is no longer offered when I compile the code now.
11-12-2012 03:19 PM - edited 11-12-2012 03:32 PM
Hi efarr
Does it have to be the temporary directory? There a great article here which shows how to get/set the current working directory.
Having checked MSDN there is a GetTempPath method in kernel.dll which you can access but I can't see an equivalent set function, it's a system-wide property which I'm not sure is designed to be changed by applications like LabVIEW.
Kind Regards
11-12-2012 03:32 PM
Chris,
I inherited a large code that makes extensive use of the Temporary Directory function. It would be easier to control the location of that function than to make lots of changes to the code. Former users of the code report that they fixed "file not found" problems by adjusting the temporary directory using menus
Regards,
11-12-2012 04:21 PM - edited 11-12-2012 04:25 PM
Hi efarr
You should be able to change the temporary directory in LV2011 via the 'Tools' >> Options menu as discussed here
You said it's not available - could you show me a screenshot of what you mean?
Kind Regards
11-12-2012 04:26 PM
While I'm building code, that works. But not when I'm executing a built app.
In other words, we used to fix the problem by having the user to adjust the Temporary directory while running the bult app.
11-12-2012 04:54 PM - edited 11-12-2012 04:55 PM
Hi
Setting the directory via Tools >> Options writes changes to the LabVIEW.ini file. In the case of the temporary directory it's the line 'tmpdir=C:\wherever_you_want'
You can add the same line to your applications ini file to the same effect.
Hope this helps.