On this Page

    $Variables

    All non-interactive DocOrigin programs use a common command-line processor. This includes the availability of a number of $X folder mapping settings that are used as shortcuts for various file paths. See $X String Substitutions. The $ variables tend to be defaulted in the standard .prm files that come with the DocOrigin system but can be redefined by you. These variables are all automatically defined within the DocOrigin JavaScript system as pre-defined javascript variables.

    For example, in a typical DocOrigin installation $F is a shortcut to the forms folder (C:/DocOrigin/User/Forms on Windows).

    var mfile = $F + "/myfile.txt";
    var mfile2 = "C:/DocOrigin/User/Forms/myfile.txt"; // same as mfile

    Note that if the string is to be used in a context where a file name is expected then you can actually embed the $X reference in the string. E.g. var fp = _file.fopen("$O/myFile.ini");. That is, you can avoid the tedium of $X + "..." concatenation constructs. It is highly recommended that you make use of these $ variables when designing your scripts as they will create code that is easier to manage when moved to a different computer system. The makers of DocOrigin promise never to use $V, $W, $X, $Y, or $Z. You may use those without fear of a subsequent release coming along and redefining their meaning.

    Defaults:

    $varMeaning
    $RYour installation folder -- never override this!
    $EWhere the current executable resides -- set automatically, do not override
    $NThe base name of the executable, e.g. Merge, RunScript, ... It is set automatically. Do not stray from this meaning.
    $BThe current directory at the very beginning of execution. The code sets this for you but does not itself reference it.
    $UWhere the User folder tree is; ($R/User) -- we wish that you not override this. The meaning itself is fixed.
    $CWhere the *user* configuration files are. This is the meaning that $C has, where you define it to point to is your business.
    $LWhere log files are to be kept. Set as you like, but make sure it has this stated meaning.

    As of 3.0.001.11...

    $varMeaning
    $$FWhere the current form resides, not forms in general, but the current form. (Merge-only).
    $$DWhere the current data file resides, not data files in general, but the current data file. (Merge-only).
    $$XRe FilterEditor: In a .xfilter file refers to the location of the .xfilter file