Model.hm_comparewritepairedcomps#
- Model.hm_comparewritepairedcomps(filename, match_type)#
Writes a list of pairs of source and target components to an output file.
This helps extract relevant compare component data from
Model.hm_comparewriteresults(). This must be preceded by a call to a relevant hm_compareentities function.- Parameters:
filename (hwString) – The full name and path of the file to write the results to.
match_type (int) –
The type of match to query for the area. Valid values are:
0 - Unmatched
1 - Topological
2 - Intersected
3 - Overlapped
4 - Matched
- Returns:
hwReturnStatus- Status object
Example#
Compare elements from componentswith IDs 1 and 2 and write the paired results to “ C:/temp / paired_compare.txt “#import hm import hm.entities as ent model = hm.Model() comps1 = hm.Collection(model, ent.Component,[1]) filter1 = hm.FilterByCollection(ent.Element, ent.Component) elems1 = hm.Collection(model, filter1, comps1) comps2 = hm.Collection(model, ent.Component,[2]) filter2 = hm.FilterByCollection(ent.Element, ent.Component) elems2 = hm.Collection(model, filter2, comps2) model.hm_compareinit() model.hm_compareentitiessameside( source_entities=elems1, target_entities=elems2, tolerance=0.1, result_type=2, review_results=False, ) model.hm_comparewritepairedcomps( filename="C:/temp/my_compare.txt", match_type=4) model.hm_compareend()