Organizing Resources in PRM File

This task shows how you can organize and change the location of resources in a project resource management (PRM) file. This function is also sometimes referred to as "using an alias".
After an initial setup effort, this allows you to change the location of resources as shown in the PRM file by simply changing the directory path on one line. This makes it easier to use a different set of resources, for instance, especially if you have organized like resources into individual directories.

1. You need to add the data at the beginning of the PRM file. In the sample PRM file the data is shown beneath the following line:

<!-- Aliases in the project file -->

2. Under this line, you need to identify the organizational name (the alias name) in which you want to group certain resources, and the directory path to it. The following line is an example. You need to follow the format shown in it.

 <Alias Name="Startup_Directory" Value="..\..\EquipmentAndSystems\" />

You can use any alias name. You can replace ..\..\EquipmentAndSystems\ with an absolute path, in which case the application will look for the resource at that location. The following is an excerpt from the sample PRM file, to show what the beginning of the file looks like:

<!DOCTYPE Project SYSTEM "Project.dtd">

<Project Name="Sample_Project">

<!-- Aliases in the project file -->
<Alias Name="Startup_Directory" Value="..\..\EquipmentAndSystems\" />
<Alias Name="Components_Directory" Value="..\..\components\" />
<Alias Name="MultiDiscSample" Value="MultiDiscipline\SampleData\" />


<!-- ************** PROJECT RESOURCES ************** -->

<!-- ID SCHEMA RESOURCES -->

3. You now need to replace the value of the Location field for each resource that you want to place in the organizational element you just created - in this case it is Startup Directory. The Location field should read:

Location="${Startup_Directory}\Piping\DataDictionary"/>

In the example above, the application will replace the words "Startup Directory" with the value ..\..\EquipmentAndSystems\ so that the directory path of the resource is actually read as ..\..\EquipmentAndSystems\Piping\DataDictionary.  Whenever you want to change the location from the directory "EquipmentAndSystems" to another directory you only need to change it once in the appropriate line in the Aliases section.

You need to do this for all resources you want grouped under a certain organizational element.

4. You can enter more than one alias name in the Location field for a resource. For instance, using the example given above, you can enter the following:

"${Startup_Directory}\${MultiDiscSample}\EquipmentComputedAttributes.txt"

in which case the application will look for the directories defined under the two alias names (..\..\EquipmentAndSystems\MultiDiscipline\SampleData) followed by the file name (EquipmentComputedAttributes.txt).

5. You also have the ability to add the Path field to a resource. This is a matter of choice and provides the same functionality as using the Location field only. In the following example, both Location and Path fields are used:

Location="EquipmentComputedAttributes.txt" Path="${Startup_Directory}\${MultiDiscSample}"/>

The application will read it as ..\..\EquipmentAndSystems\MultiDiscipline\SampleData\
EquipmentComputedAttributes.txt.

6. Instead of adding the alias names to a PRM file, as explained in Steps 1 & 2, you can add an environment variable to your environment file. To use the same example given in Step 2 above, you would add the following line in the environment file:

set Startup_Directory=..\..\EquipmentAndSystems\

You can use an absolute path also.

You then need to replace the value of the Location fields in the PRM file, as explained in Step 3 above.

The application uses the following order to determine if an alias is used:

  • The environment file.
  • The project resource management file.
  • The application management resource file.