How to Generate Unique ID for Model Elements

ID is a very useful property for a model elements. Having an unique ID for your model elements not just can ease the communication between your team but also help to structure your model in a more systematic way. Visual Paradigm can help you to generate unique ID for your model elements. Besides, you can apply customized patterns to the ID to accommodate your needs in different situations. In this article, we will show you how to configure the ID generator to generate customized ID for your model elements with Visual Paradigm.

Defining ID Generator

To define the ID generator:

  1. Go to Windows > Project Options from the toolbar.

    Open Project Options

    Open Project Options

  2. In the Project Options dialog, select Diagramming on the left, then open the Model Generation page on the right.

    Switch to Model Generation tab

    Switch to Model Generation tab

  3. The model type which have ID automatic generated upon creation are listed under the ID Generator Format table.

    ID Generator Table

    ID Generator Table

  4. To add a new model type, press the Add button and select the model type from the popup list. You can also use the search utilities to look up the model type you would like to add to the ID generator.

    Search for model type to add to ID Generator

    Search for model type to add to ID Generator

  5. Once the model type is added to the ID Generator Format table, you can then customize its pattern by defining the Prefix, Suffix as well as the Number of digits for the ID. Press OK to commit your change.

    Define ID pattern

    Define ID pattern

  6. Now, the newly created model element with ID generator defined will have custom ID assigned.

    ID is being generated to the newly created model elements

    ID is being generated to the newly created model elements

Showing ID in diagram

For some model types, such as use case and business process diagram elements, you can have their IDs shown in the diagram. For use case, you can right click on the blank area of the use case diagram and select Presentation Options > Use Case Display Options > Show ID to show it up.

Showing Use Case's ID in diagram

Showing Use Case’s ID in diagram

For business process diagram, you can right click on the blank area of the diagram and select Presentation Options > Configure Show ID Options and then select to show the ID as a label as part of the caption, or in a customized way. You can also specify the ID to be shown on particular model type.

Configure how the ID of business process diagram elements being shown

Configure how the ID of business process diagram elements being shown

Using ID to determine model structure

Although the ID can help you to uniquely identify the model element in your project. But it didn’t tell anything regarding to the structure of the model. You can include the model’s parent ID as part of its own ID to allow it to show the model structure. Simply go to the Model Generation section of the Project Options dialog and switch on the Sub-Level ID option, the ID of the parent model element will be added in front of its own ID.

Turn on Sub-Level ID option to include parent's ID as part of its own ID

Turn on Sub-Level ID option to include parent’s ID as part of its own ID

With the parent’s ID showing, you can easily identify the structure of the model element by just using the ID.

Model's ID indicating model's structure

Model’s ID indicating model’s structure

Watch this tutorial in action

Watch this tutorial on Youtube http://www.youtube.com/watch?v=2riEB5BHslk

Related Articles

Related Links

 

2 replies
  1. Arnaud Lelevé says:

    Hello. How can I systematically display the ID for blocks in a BDD diagram please ? I added an ID generation for this kind of model element; it is correctly generated and visible in the properties of each block but I can’t find where the option to display them is.

  2. Arnaud Lelevé says:

    Hello. How can I display the ID of Use Cases showed in a Requirement Diagram please ? They appear for Requirements but not for UC.

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply