@attributereferencecount()

Returns the number of times an entity is referenced by an attribute.

Syntax

@attributereferencecount (entity type, id)

Type

HyperMesh Template Function

Inputs

entity type
The type of entity referenced.
id
The entity ID.

Example

If you want to output only curves that are referenced, such as by a material or load, use an *if statement as follows:

*curves()
  *format()
   *if([@attributereferencecount(curves,id) > 0)])
      *string("Load Curve #")
      *field(integer,id,0)
      *end()
    *endif()
*output()

The block above writes out only referenced curves, and those generated via post-processing operations are omitted (if they are not pointed to by an attribute).