hm_getduplicateelements

Returns a list of lists containing duplicate elements.

Syntax

hm_getduplicateelements input_mark_id output_mark_id options

Type

HyperMesh Tcl Query Command

Description

Returns a list of duplicate elements as a list of lists. The duplicate elements are determined per theoptions argument. The format of the returned values is a list of lists, sorted from lowest to highest ID. Each list corresponds to the duplicate elements at that "location". For example, if element 1 is a duplicate with elements 2 and 3, and element 4 is a duplicate with elements 5, 6 and 7, the return would be a list of length 2, with each sub-list containing the duplicates:

{1 2 3} {4 5 6 7}

Inputs

input_mark_id
The ID of the mark of elements to consider. Only elements on this mark will be considered for use in finding duplicates. Valid values are 1 and 2.
output_mark_id
The ID of the mark to put duplicate elements on. Valid values are 0, 1 and 2. If set to 0, the output mark is not used.
options
Currently unsupported. Must be set to 0.

Example

To find duplicates for the displayed elements and put all of them on mark 2:

*createmark elems 1 displayed
set duplicates [hm_getduplicateelements 1 2 0]

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

11.0