ARCWAY Cockpit

Using the Model Element ID Tool

This help text introduces working with the Model Element ID Tool and gives an insight in its operating mode. You will find some general hints for using this tool first. Please read through these hints carefully before starting to work with the tool . The following paragraphs will then give a step by step instruction on using the tool.

ID Allocation

The purpose of the tool is to set IDs for selected unique elements. It will only set IDs for unique elements that don't have an ID yet. Each ID that will be generated by the tool consists of the prefix DB und a 4-digit number beginning with 0001. The number will be incremented whereas the prefix is fix. New IDs will be generated according to the last allocated ID (that begins with DB).
Note that IDs of deleted unique elements will be reallocated. This means that when the unique element DB0003 has been deleted and DB0003 was the last allocated ID this ID will be assigned again.
The IDs of unique elements that already have an ID will, even if the ID is different from the described format, not be changed.

Combined Name Property

Additionally to the ID property a so called combined name property will be generated. This property contains the ID and the name of a unique element. This means that for an element with the ID "DB0001" and the name "Purchasing Department" the value "DB0001 Purchasing Department" will be generated.

ID Disabler Property

The ID disabler property allows to determine the elements that shall not have an ID. This value is set to "false" by default. Make sure that this property is set to "true" for all elements that shall not have an ID before allocating the IDs.
The ID of unique elements that have this property set to "true" will be deleted. The combined name property will contain the name of the unique element only.

Getting started

The tool should only be used with one client at a time.
Other users should commit their changes to the server before using the tool for locked unique elements may not be refreshed otherwise. This affects in particular new and renamed unique elements that don't have an ID yet or have not been refreshed since they were renamed and is important for the combined name property.
Note that only those unique elements will be considered that are known to the client that generates the IDs. It is recommended to make sure that all relevant changes of other users have been uploaded to the server. Refresh the project manually to assure that these changes have been received by your client.
We suggest to commit all changes to the server after using the tool as many unique elements may be locked. Any ID allocation should begin with starting the tool and end with commiting the changes.

Step by Step

Creating the required Custom Properties

It is necessary to create custom properties for unique elements that will be set to the generated values.
If this has not been done yet, perform the following steps:

  1. Select your project in the project navigator and use the right mouse button to open the context menu.

  2. Select the context menu entry Properties.

  3. Select the entry Administrate custom properties and the sub item Unique element.

  4. Select Add, to add a custom property.
    Create three properties for:

    You have to set an ID, a display name and a data type for each property.

    Weitere Eigenschaft definieren

    The ID disabler property has to be of type Boolean, whereas the two other properties have to be of type String.
    Pay attention to a conclusive name when setting the ID for the combined name property as this may be needed for generating reports.
    We also suggest to name the ID for the ID property "id".

    Weitere Eigenschaften für globales Element

  5. Confirm your input with OK

Setting the ID Disabler Property

The ID disabler property has the default value "false". This value has to be set to "true" to exclude an element from the ID allocation. See through each element in the repository that has to be excluded and set the value to "true":

  1. Select the unique element with the right mouse button.

  2. Select the context menu entry Properties.

  3. Select the entry Custom properties in the dialog and check the property.

  4. Confirm your input with OK.

ID-Deaktivierungs-Eigenschaft setzen

You can also change the ID disabler property for several unique elements at once in the repository view. Perform the following steps:

  1. Select all unique elements for which you want to set the ID disabler property. Deactivate the containment hierarchie to view all existing unique elements if necessary. Use filters to view unique elements of a certain type. You can select more than one element with the help of the shift or control key.

  2. Activate the view menu and select the entry Tools > Set value....
    ID-Deaktivierungs-Eigenschaft setzen

  3. Now you can find or edit the following information in a dialog:

    Set the ID disabler property and the desired value here.
    ID-Deaktivierungs-Eigenschaft setzen

  4. Confirm your input with OK.

  5. The values will be refreshed. You will be informed about the changes afterwards. This includes a list of all modified unique elements and, if applicable, a notification about the elements that have not been modified (e. g. due to locks).
    ID-Deaktivierungs-Eigenschaft setzen

Generating the IDs

You can now generate the IDs in the repository view. Proceed as follows:

  1. Select all unique elements that shall be considered for the ID allocation.

  2. Activate the view menu and select the entry Tools > Update Element IDs....
    ID-Werkzeug auswählen

  3. Now you can find or edit the following information in a dialog:

    Name the custom properties that have been created for this purpose here.
    ID generieren

  4. Confirm your input with OK.

  5. The IDs will be generated. You will be informed about the changes afterwards. This includes a list of all modified unique elements and, if applicable, a notification when IDs have been assigned twice or have not been assigned (e. g. due to manual changes, concurrent changes or locks).
    IDs generiert

  6. Make your changes available to all users by commiting them to the server.

ID Property Presentation in Cockpit

The ID property can be displayed as alternative labeling in a plan. Perform the following steps in order to do so:

  1. Select the desired plan in the project navigator and activate the context menu with the right mouse button.

  2. Select the entry Open Plan With Property "[ID and Name]".

  3. The unique elements will be displayed with the combined name property values in the plan editor.
    Plan mit kombiniertem Namensfeld als Beschriftung

You can also find the properties in the details view and the properties dialog for a unique element.
Detailsicht mit ID-Eigenschaft

ID Property Presentation in Reports

You can add the ID properties to your reports as alternative labeling on a plan or within a list of unique elements.

Alternative Labeling in Plans

To add plan images to reports add the following code to your report template (example from the ARCWAY standard complete report):
#####################################################################
##
## MACRO: showPlan
## Creates the report output for one plan. For each plan the name, ## the ## description, an image of the plan and all contained unique ## elements will ## be added to the report.
##
## @para [in] plan reference to a plan
##
#####################################################################
#macro( showPlan $plan )

   [..]

   ## Add an image of the plan and a caption
   <para role="Image">
   $plan.getImageFile()
   </para>

   [..]
#end

Change the line

$plan.getImageFile()

to add a plan image with alternative labeling to your report:

$plan.getImageFileWithReplacedPlanElementName("custom.idname")

In this case custom.id is the name of the id that you picked for the custom property for the combined name property (cf. Creating the required Custom Properties).

Within a List of Unique Elements

To add the ID property to your report within a list of unique elements, simply add the custom properties of unique elements to your report.

Also use the related help pages and the ARCWAY standard complete report as an example for more information on report generation.