hm_getnearbyentities

Finds entities nearby entities on an input mark.

Syntax

hm_getnearbyentities inputentitytype=<input_entity_type> inputentitymark=<mark_id> outputentitytype={<output_entity_type1> ?<output_entity_type2> ... <output_entity_typeN>?} outputentitymark=<mark_id> radius=<value> ?nearby_search_method=<method>?

Type

HyperMesh Tcl Query Command

Description

Finds entities nearby entities on an input mark.

The options may be provided in any order.

Inputs

inputentitytype=<input_entity_type>
The input entity type to find nearby entities to. Valid values are comps, elems, equations, loads, nodes, systems and vectors.
inputentitymark=<mark_id>
The ID of the mark of input entities. Valid values are 1 and 2.
outputentitytype={<output_entity_type1> ?<output_entity_type2> ... <output_entity_typeN>?}
The list of output entity types to find. Valid values are comps, elems, equations, loads, systems and vectors.
outputentitymark=<mark_id>
The ID of the mark of output entities. Valid values are 1 and 2.
radius=<value>
The nearby search radius/size.
nearby_search_method=<method>
The optional search method, either box or sphere (default).

Examples

To query loads and elements nearby comps 301 and 302 using a sphere of size 100:
*createmark comps 1 "by id only" 301 302
hm_getnearbyentities inputentitytype=comps inputentitymark=1 outputentitytypes={loads elems} outputentitymark=2 radius=100 nearby_search_method=sphere

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

2020