Salesforce

Retrieving the Project Directories (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Retrieving the Project Directories (Magic xpa 4.x)

The working directory (the directory of the main project), the engine's directory, and the directory of the project file (relevant for components) are retrievable using the following reserved logical names:

  • %EngineDir% – This logical name will be translated to the path of the Magic xpa engine.

  • %WorkingDir% – This logical name will be translated to the path of the working directory.

  • %TempDir% – This logical name will be translated to the path of the temporary directory defined by the operating system.

When no project is opened, the %WorkingDir% will return the same value as the %EngineDir%.

For tool applications, the %WorkingDir% will return the %EngineDir%.

These logical names can be used in the path related entries in the environment settings and in path-related properties of a project using the Translate function.

The ProjectDir function lets you refer to files that are relative to the location of a component file.

Changing the Internal Logical Name Value

Since version: 1.8 SP1

You can change the %WorkingDir% and %TempDir% internal logical names from the command line only.
For example: ‘MgxpaRuntime.exe /[MAGIC_LOGICAL_NAMES] WorkingDir =C:\temp’
However, you cannot change the %EngineDir% internal logical name.

If a logical name using a reserved name is manually defined in the INI file, it will be disregarded.

An INIPut function that sets a logical name using a reserved name, will write the entry in the INI file, but will not affect the translation of the reserved logical name. These logical names cannot be retrieved using an INIGet function on the LOGICAL_NAMES section.

Related Topics

The Online and Rich Client Samples projects (program EV04 and REV04)

Reference
Attachment 
Attachment