CurrentDir - ObjectVision/GeoDMS GitHub Wiki

File, Folder and Read functions currentDir(ectory)

syntax

  • currentDir()

definition

  • currentDir() results in a string parameter with the working directory of the process.

In the GeoDMS GUI that is the folder of the root file of the loaded configuration: the GUI changes the working directory to that folder when it opens a configuration. GeoDmsRun does not, so under GeoDmsRun currentDir() returns whatever folder the run was started from, which is usually not the configuration folder.

Do not confuse this with the %currDir% placeholder, which always resolves to the folder of the root configuration file, in every executable. In a StorageName, %currDir% is what you want.

example

parameter<string> cdir := currentDir();

result in the GUI, configuration opened from that folder: cdir = 'c:/data/dev/prj/tst/Operator/cfg'

result from GeoDmsRun.exe c:/data/dev/prj/tst/Operator/cfg/x.dms /item started in c:/windows/temp: cdir = 'C:/Windows/Temp'

⚠️ **GitHub.com Fallback** ⚠️