Model.hm_compareinit#
- Model.hm_compareinit()#
Initializes the comparison module. This must precede any calls to other hm_compare APIs, and must be followed by a call to
Model.hm_compareend().Any database changes made while inside of the compare module will invalidate and delete any comparison results.
- Returns:
hwReturnStatus- Status object
Example#
Write the detailed comparison results file to “ C:/temp / my_compare.txt “ for the same side comparison of surfuces 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=False, ) model.hm_comparewriteresults( filename="C:/temp/my_compare.txt", source_component_id=0, target_component_id=0 ) model.hm_compareend()