Model.clearallunresolvedids#

Model.clearallunresolvedids(entity_type)#

When importing a file that references entities that are in another file that is not imported at the same time, those entities are recorded and protected from overwrite so that the links will not be lost. This way, fragments of a larger model can be edited while keeping links to the other parts of the model intact.

If another fragment of the larger model containing some of the unresolved references is imported, will complete the links between the two model fragments and remove the protected entity IDs from the unresolved IDs database.

If you wish to discard all of those links for a certain entity type, this function will clear the unresolved IDs from the database for that entity type.

Normally, the feinput system handles everything automatically. Therefore, the need to use this function is very rare and is provided for situations that need to exactly target the creation of new entities to fulfill the unresolved links.

Parameters:

entity_type (EntityFullType) – The type of entity to remove unresolved IDs for.

Example#

Remove all unresolved IDs for properties#
import hm
import hm.entities as ent

model = hm.Model()

model.clearallunresolvedids(entity_type=ent.Property)