Model.clearunresolvedid#
- Model.clearunresolvedid(entity)#
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 one of those links for a certain entity type, this function will clear that unresolved ID 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 (Entity) – The object describing the entity to remove the unresolved ID.
Example#
Remove property with ID 5 from the unresolved IDs database for properties#import hm import hm.entities as ent model = hm.Model() model.clearunresolvedid(entity=ent.Property(model, 5))