GetUserDirectory

GetUserDirectory returns the UniPlot user directory.

ssUserDir = GetUserDirectory()
ssUserDir = GetUserDirectory(bLocal)

Return Value

ssUserDir is the name of the UniPlot User Directory.

Parameters

bLocal

bLocal is an optional parameter. If the UniPlot user directory is not on a local drive GetUserDirectory(TRUE) returns a local directory specified in the environment variable LocalAppData. For example c:\users\peter\AppData\Local\UniPlot\.

Example

Example

* GetUserDirectory()
   C:\Documents and Settings\Peter\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 then 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 use Explorer to create the directory if the dircectory does not yet exist.

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

History

Version Description
R2013.3 New Parameter bLocal.
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