Merging local and global types (S)

In order to merge a local type with the global one rename the local one and try to give it the name of an already linked global type. Such an attempt to rename will be treated as a request to merge two types. So, you will get the following question.

 

MergingTypesQuestion2

 

If you answer Yes you will get one global type consisting of items of both original types. The merging is only possible if both local and global types have the same scope and the same item properties.

It may happen that the global type has already local items and one or more of these local items have the same name as an item of the merged local type. Since it is not clear what to do in such a situation, the following error message appears:

 

MergingTypesError

 

Then, you have to fix the conflict manually. You can just rename this local item, delete it or try to assign it to the global type property in all steps where it is assigned to the local one, and then delete it (you can use the Find function to find all these steps).

 

Custom types have the Scope property and the Extra item properties property. Merging is possible only if the scopes are the same and there are no extra item properties. So, you can get the following message:

 

DifferentScopes

 

To fix this you must change the scope of the local type 'Town'. However, if you get the following message

 

MergingWithExtraProperties

 

merging is not possible at all even if the sets of extra items properties in both types are the same.  

 

 

Note: Renaming is an undoable operation. So, if you undo it the types will be split again and will get original names. However, if you close the project and open it again there will be no possibility to split the types then. You can only create a new local type with the old name but all items must be recreated again and manually assigned in all places where the old items were assigned.

 

Merging will be done automatically when the name of the global type that is going to be linked to a project is the same as an already existing local type name. Then the following question appears:

 

MergingTypesQuestion

If you answer Yes then you will get only one merged type with the conflicting name which is global.

If, however, the local and global types have different scopes they cannot be merged automatically and you get the following advice:

 

DifferentScopes2

 

Similarly, if the local and global types have extra item properties the following message will be shown:

MergingWithExtraProperties2