GetUserDirectory returns the UniPlot user directory.
Return Value
ssUserDir is the name of the UniPlot User Directory.
Example
* GetUserDirectory()
C:\Documents and Settings\Samuel Brüggenkoch\My Documents\UniPlot
Comment
The user home directory is set in the registry. UniPlot will use the directory for application data (key “Personal”). In this directory UniPlot will create a directory with the name uniplot.
Example: c:\documents and settings\samuel brüggenkoch\my documents\uniplot\.
If a user name is specified in the command line (see Properties in the UniPlot icon on the desktop), e.g.
uniplot.exe /user "TDA"
the user name “TDA” will be added to the path. The user home directory would than look like this:
Example: c:\documents and settings\samuel brüggenkoch\my documents\uniplot\TDA\.
If you do not want to use the default user home directory you can set the directory in the registry found in the key Settings\User-Home-Directory. The following function call will set a home directory and can be executed in the UniPlot View=>Command Window:
WriteProfileString("Settings", "User-Home-Directory", "c:\\MyUniPlotHomeDir")
Please note that the directory is not created. Please use Explorer to create the directory.
The user home directory is displayed in the Tools=>More Options dialog box.
In the user home directory, the following folders should be created:
| Directory | Meaning |
|---|---|
| Addin | Directory for user Addins. |
| Autoload | UniPlot will load all UniScript files with the extension .ic during startup from this directory. |
| Script | UniScript files should be saved in this directory. |
| Template | This directory is for templates, style file, etc. |
| Settings | Directory for files with settings, log files, etc. |
| data | Default directory for NC files. |
History
| Version | Description |
|---|---|
| 5.1.0 | Subdirectiories will be created, if they do not already exist, when the function is called. A new sub directory “Settings” has been added. |
id-1781776