Model.hm_compareend#

Model.hm_compareend()#

Clears memory and comparison graphics, and ends the comparison module. This must be preceded by any calls to Model.hm_compareinit() and other hm_compare APIs.

“Major” database changes made while inside of the compare module will invalidate and delete any comparison results.

Returns:

Example#

Write the detailed comparison results file to “ C:/temp / my_compare.txt “ for the same side comparison of surfaces with IDs 1 - 20 and 101 - 120#
import hm
import hm.entities as ent

model = hm.Model()

surfs1 = hm.Collection(model, ent.Surface, list(range(1, 21)))
surfs2 = hm.Collection(model, ent.Surface, list(range(101, 121)))

model.hm_compareinit()

model.hm_compareentitiessameside(
    source_entities=surfs1,
    target_entities=surfs2,
    tolerance=0.1,
    result_type=2,
    review_results=0,
)

model.hm_comparewriteresults(
    filename="C:/temp/my_compare.txt", source_component_id=0, target_component_id=0
)

model.hm_compareend()