Exodus 7.10

Functions
ex_get_prop_names.c File Reference
`#include "exodusII.h"`
`#include "exodusII_int.h"`

## Functions
int | ex_get_prop_names (int exoid, ex_entity_type obj_type, char **prop_names)

## Function Documentation

## ◆ ex_get_prop_names()

int ex_get_prop_names | ( | int | exoid,
|  | ex_entity_type | obj_type,
|  | char ** | prop_names
| ) |  |

The function ex_get_prop_names() returns names of integer properties stored for an element block, node set, or side set. The number of properties (needed to allocate space for the property names) can be obtained via a call to ex_inquire() or ex_inquire_int().

Returns
  In case of an error, ex_get_prop_names() returns a negative number; a warning will return a positive number. Possible causes of errors include:
  - data file not properly opened with call to ex_create() or ex_open()
  - invalid object type specified.

Parameters

  [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open().
  [in] | obj_type | Type of object; use one of the options in the table below.
  [out] | prop_names | Returned array containing num_props (obtained from call to ex_inquire() or ex_inquire_int()) names (of maximum length `MAX_STR_LENGTH` ) of properties to be stored. ID, a reserved property name, will be the first name in the array.

ex_entity_type | description
--- | ---
EX_NODE_SET | Node Set entity type
EX_EDGE_BLOCK | Edge Block entity type
EX_EDGE_SET | Edge Set entity type
EX_FACE_BLOCK | Face Block entity type
EX_FACE_SET | Face Set entity type
EX_ELEM_BLOCK | Element Block entity type
EX_ELEM_SET | Element Set entity type
EX_SIDE_SET | Side Set entity type
EX_ELEM_MAP | Element Map entity type
EX_NODE_MAP | Node Map entity type
EX_EDGE_MAP | Edge Map entity type
EX_FACE_MAP | Face Map entity type

As an example, the following code segment reads in properties assigned to node sets:

int error, exoid, num_props, *prop_values;
char *prop_names[MAX_PROPS];
/* read node set properties */
num_props = ex_inquire_int(exoid, EX_INQ_NS_PROP);
for (i=0; i < num_props; i++) {
prop_names[i] = (char *) malloc ((MAX_STR_LENGTH+1), sizeof(char));
prop_values = (int *) malloc (num_node_sets, sizeof(int));
}
error = ex_get_prop_names(exoid,EX_NODE_SET,prop_names);
for (i=0; i < num_props; i++) {
error = ex_get_prop_array(exoid, EX_NODE_SET, prop_names[i],
prop_values);
}