attrinfo#

ENS_QUERY.attrinfo(attrid: Any | None = None) dict#

For a given attribute id, return type information

The dictionary returned by will always have the following keys:
  • type the high-level type. This can include any of the values noted in the next section

  • basetype the low-level type. Only types starting with CVF are allowed.

  • numvals the number of values of the basetype.

  • desc string description for the attr

  • name the python legal name for the attr

  • flags this integer is formed by or-ing values from the table below

Optional keys:
  • range if selected in the flags, this key will be a list of two floats or ints: [min,max]. see flags below

  • enums if selected in the flags, this key will be list of lists. Each list has three values: [int_value, description, python_name]. The integer value is the number for the enum (see flags below), while the other two values are human and Python strings. The python_name will also be available as an integer in the ensight.objs.enums module.

  • dependencies if present, this key is a list of dictionaries that describe the fact that this attr is dependent on another attr. The dictionary is described below.

Parameters:
attridOptional[Any]

The attribute to query

Returns:
dict

A dictionary that describes type information for the attribute.

Examples

>>> part.attrinfo(session.ensight.objs.enums.VISIBLE)