hm_comparewriteresults

Writes the current comparison results to a file.

Syntax

hm_comparewriteresults filename ?source_component_id? ?target_component_id?

Type

HyperMesh Tcl Query Command

Description

Writes the current comparison results to a file. This must be preceded by a call to a relevanthm_compareentities* command.

If hm_comparesetflags is set to 1, the pairwise data can be seen in the output file, otherwise the legacy output will be generated. The optional arguments are only valid when hm_comparesetflags is set to 1.

Inputs

filename
The full name and path of the file to write the results to.
source_component_id
If ignored, or set to 0, all the compared data corresponding to all source components will be generated. If a valid source ID is given, the compared data for the corresponding source component is generated.
target_component_id
If ignored, or set to 0, all the compared data corresponding to all target components will be generated. If a valid target ID is given, the compared data for the corresponding target component is generated.

Example

To write the detailed comparison results file to C:/temp/my_compare.txt for the same side comparison of surfs 1-20 and 101-120:
*createmark surfs 1 1-20
*createmark surfs 2 101-120
hm_compareinit
hm_compareentitiessameside surfs 1 surfs 2 0.1 2 0
hm_comparewriteresults C:/temp/my_compare.txt
hm_compareend
Compare assembly 1 to assembly 2 and write the pairwise results to C:/temp/pairwise_compare.txt:
*createmark elems 1 "by assems" 1 
*createmark elems 2 "by assems" 2
hm_compareinit
hm_comparesetflags 1
hm_compareentitiessameside elems 1 elems 2 1.0 2 0
hm_comparewriteresults C:/test/pairwise_compare.txt
hm_compareend
Compare assembly 1 to assembly 2 and write the pairwise results for source component 10 and target component 20 to C:/temp/pairwise_compare.txt:
*createmark elems 1 "by assems" 1 
*createmark elems 2 "by assems" 2
hm_compareinit
hm_comparesetflags 1
hm_compareentitiessameside elems 1 elems 2 1.0 2 0
hm_comparewriteresults C:/test/pairwise_compare.txt 10 20
hm_compareend

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

12.0

2020 - Added new options source_component_id and target_component_id.