Model.hm_comparewritefile#
- Model.hm_comparewritefile(filename)#
Writes the current comparison data (transformations, match types, match entities, etc.) to a file. This must be preceded by a call to a relevant hm_compareentities function.
This file can be reloaded using
Model.hm_comparereadfile()to repopulate the results in a different session.- Parameters:
filename (hwString) – The full name and path of the file to write the data to.
- Returns:
hwReturnStatus- Status object
Example#
Write the comparison data 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=False, ) model.hm_comparewritefile( filename="C:/temp/my_compare.txt") model.hm_compareend()