How can i evaluate the TempFilePath stored in the navision client (extras\options…). Bye Stefan Edited by - StefanZimmer on 2002 Aug 16 14:54:28
Not exactly sure what you mean by evaluate? The Navision TempFilePath is used by the Client where to create its tempoary files. When the Client is launched at least two temporary binary files are created. In addition, as the user launches reports additional temp files may be created.
i want to get the value of the field TempFilePath, to use this path for creating own temporary files. Bye Stefan Edited by - StefanZimmer on 2002 Aug 16 15:10:39
I thought that this information might be kept in a virtual table but I am unable to find. Alternatives: Use ENVIRON(‘Temp’) to get the Windows temp path. Or define the TempFilePath variable in the commandline when you launch Navision (see System & Installation Manual Chapter 4, page 60) and then use the function COMMANDLINE to obtain the path.
You could specify the Temppath-Parameter when calling the NAVISION Client (Shortcut Properties):
[code]"C:\Program Files\NAVISION Attain\Client\fin.exe" servername=ATTAIN,nettype=tcp,**temppath=C:\TEMP[/code]**
If you are calling NAVISION like this, then you can get the parameter-string with the function COMMANDLINE. e.g.
[code]MESSAGE('%1', COMMANDLINE)[/code]
would show servername=ATTAIN,nettype=tcp,temppath=C:\TEMP This string could be parsed to “cut out” the TempPath(-Parameter) … Another possibility could be this: Set a Environmant Variable defining your NAVISION TempPath (if it’s different from “Standard TEMP”, if not, this variable already exists: TEMP or TEMPPATH), depending on your Operating System, e.g.
[code]SET NAVTEMPPATH=C:\TEMP[/code]
in autoexec.bat Then you can access this variable with the ENVIRON function. e.g.
[code]MESSAGE('%1', ENVIRON(NAVTEMPPATH))[/code]
would show C:\TEMP
Alan: 2 Answers, 2 Solutions, 2 Members in 2 Minutes! That’s NOLUG efficiency! Joerg A. Stryk Apollo-Optik, IT/ERP
hy alan and jörg thankx for your quick replies i want to avoid using the environ statement because it can be ‘temp’ or ‘temppath’ maybe ‘tempdir’ or what ever … the idea using “commandline” is a good one but are you sure, erveryone starts navision with this command-line-parameters … if someone starts navision this way: “start/programs/navision/navision…” or with a click on fin(sql).exe you will get ‘’ as returnvalue. My hope was - if i can get the value of tempfilepath it would be an easy way to get the information no matter which OS is running. So i had to kiss that frog, serching the temppath with “envirom” first in “temp” then in “temppath” and if i got no values i must stop the procedure… bye Stefan Edited by - StefanZimmer on 2002 Aug 16 17:11:34
Stefan, I would suggest that you use the SHELL command in Codeunit 1 to define an environment variable therefore it will be consistently available on all clients. You must obviously select a drive which is consistent to all workstations (some are diskless). You can use the Drive virtual table to determine which drives are available. The environment variable can be common to all clients, or could be specific such as tied the user login ID.