hm_defined

Queries whether an attribute is defined on an entity.

Syntax

hm_defined entity_type entity_name_or_id attribute_name searchType

Type

HyperMesh Tcl Query Command

Description

Queries whether an attribute is defined on an entity.

Inputs

entity_type
The type of the queried entity.
entity_name_or_id
The name or ID of the queried entity.
attribute_name
The name of the attribute.
searchType
By default, HyperMesh searches for entities by name, and if the name is not found, it then searches by ID. This option allows you to specify how the search for an entity should be conducted. The two options are:
-byname: search only by name
-byid: search only by ID

Example

If the attribute with the given name is defined on this entity, the function returns 1; otherwise, it returns 0.

If it cannot find the attribute on the current entity, @defined will also check the dictionaries; hm_defined will not do that because the dictionaries cannot be accessed outside of the template.

Errors

None.