How to reset model element ID and ID generator

tomcat-thumbHaving unique ID for your model elements are extremely useful in structure of your models in systematic way, also ease the communications with your teams. Visual Paradigm support generate unique ID for all model elements. Once configured, unique ID will be assigned to the model element upon creation. But during your development process the ID of your model elements could become cluttered (i.e. model elements being deleted) and the ID no longer generated in sequence. To solve this problem you can reset the ID of your model elements as well as the index in the ID generator. The reset of model ID involve the following steps:

We use the business process diagram as example. As in our process diagram the ID are cluttered. We start from exporting model to Excel for mass update of IDs.

Business Process Diagram with task ID being cluttered

Business Process Diagram with task ID being cluttered

Export model to Excel for mass update of IDs

We first start form export our model to Excel for mass update of model IDs. To export model to Excel:

  1. Select Project > Export > Excel.

    Select Export to Excel menu

    Select Export to Excel menu

  2. Specify the output path for the Excel file. With Launch Editor was selected so that the Excel file will open automatically for editing without manually open it from file system.

    Specify output path for the Excel file

    Specify output path for the Excel file

  3. Select Model type per sheet in Export Style combo box.

    Select Model type per sheet as Export Style

    Select Model type per sheet as Export Style

  4. Uncheck all Export Properties as they are not our focus.

    Uncheck all Export Properties

    Uncheck all Export Properties

  5. Select the diagram which contains the model element which we wish to update their ID. Alternatively you can select individual model elements under the Model Elements.

    Select the diagram for export to Excel

    Select the diagram for export to Excel

  6. The model types covered in your diagram are listed on the right. Since we only want to reset the ID for the tasks, we uncheck all other model types to generate a cleaner Excel file.

    Only select task for export to Excel

    Only select task for export to Excel

  7. Press Export to perform the export process. Once the process completes the Excel file will open for you automatically.
  8. Switch to the BPTask sheet and you can see the model ID are listed under the UserID column.

    Model Element's ID showing under UserID column

    Model Element’s ID showing under UserID column

  9. Now we can start changing their ID.

    Modify the model element's ID in UserID column

    Modify the model element’s ID in UserID column

  10. Save the change on your Excel file when modification is done.

    Save the modification

    Save the modification

Import modified Excel back to VP

Once we finish modify the IDs in Excel file we can import it back to Visual Paradigm.

  1. Now switch back to Visual Paradigm. Select Project > Import > Excel.

    Import the modified Excel back to VP

    Import the modified Excel back to VP

  2. Specify the path of the Excel file we exported in Step 6, and press Import button to import it.

    Select the Excel file to import back

    Select the Excel file to import back

  3. An Import preview dialog will show up and allow you to preview the changes. By expand the nodes we can see the User ID of the tasks is going to update. Press OK to proceed.

    Preview of import showing update of the IDs

    Preview of import showing update of the IDs

  4. Now the ID of the task in our diagram are all being updated according to the Excel file.

    Task ID being updated

    Task ID being updated

Reset ID Generator

Finally we have to reset the ID generator to use the current max ID for generating ID for the next element. To do this:

  1. Go to Window > Project Options.

    Open Project Options

    Open Project Options

  2. Select Diagramming > Model Generation.

    Select Model Generation tab under Diagramming category

    Select Model Generation tab under Diagramming category

  3. Right click on the ID Generator Format table (any row) and select Reset to Appropriate Max IDs…

    Reset ID generator

    Reset ID generator

  4. A dialog will show to remind you the reset ID process could take time (subject to your project size). Simply press OK to proceed.

    Confirm to proceed reset ID generator

    Confirm to proceed reset ID generator

  5. Press OK to close the Project Options.
  6. Now the ID generator was reset, and the newly created element will have the ID generated based on the current max +1.

    Newly created element now have the ID generated in sequence

    Newly created element now have the ID generated in sequence

Related Know-how

Related Link

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply