On this page
Please note before creating a model patch!
Since model elements are usually related to and depend on other elements, you must include the necessary elements in the scope. The Model Patch mechanism does not automatically check dependencies or include them in the patch data.
To avoid data loss:
- Go to Related Elements > Depends On and check if you are bringing all the elements that your elements depend on; or
- Ensure that the target version (the project where you are applying the patch) already has the dependent elements.
For example, you have Part A that has Type B. If you want to bring Part A, you must either:
- Include Type B in the patch as well, or
- Make sure Type B already exists in the target.
Failure to do this will lead to data loss, as Part A will be created without a type.
Creating a model patch
To create a model patch
- Open the source project.
- Do one of the following:
- In the main menu, select Tools > Patch > Create Patch.
- Right-click an element in the Containment tree and select Tools > Create Patch.
- Select the elements you want to include in the patch using the Add, Remove, and Remove All buttons.If you select an element that has child elements, all child elements are automatically included in the patch.
- Click Next.
- In the next step, select the type of patch you want to create:
- All selected content - This type of patch brings all the selected scope to the target project potentially overriding existing elements.
- Changes from selected version - This type of patch adds the selected scope to the target project as concurrent changes. If you select this patch type, also select a project version. All changes from the selected version, subsequent versions, and the current project version will be included in the patch.This patch type is only available for Teamwork Cloud projects.
- Click Next.
- Click and select the location where you want to save the patch file.
- Click Save.
Applying model patch
To apply a model patch
- Open the target project.
- In the main menu, select Tools > Patch > Apply Patch.
- Select the patch file and click Open.
- In the Apply Patch window, review the changes that will be applied to the project.
- Click the Apply Patch button.
- Investigate the results:
If you receive a message that the patch is applied successfully, it means all changes from the patch were successfully applied.
If you receive a warning that the patch has been applied, but some changes could not be applied, click OK and review the changes that were not applied in the open Changes That Are Not Applied pane.
In the Changes That Are Not Applied pane, select each change and read the description explaining the reason of the issue. To avoid such issues, remember to check element dependencies before creating a model patch.