Exodus 7.10

Functions
ex_get_prop_array.c File Reference
`#include "exodusII.h"`
`#include "exodusII_int.h"`
`#include "netcdf.h"`
`#include <stdio.h>`
`#include <string.h>`

## Functions
int | ex_get_prop_array (int exoid, ex_entity_type obj_type, const char *prop_name, void_int *values)

## Function Documentation

## ◆ ex_get_prop_array()

int ex_get_prop_array | ( | int | exoid,
|  | ex_entity_type | obj_type,
|  | const char * | prop_name,
|  | void_int * | values
| ) |  |

The function ex_get_prop_array() reads an array of integer property values for all element blocks, node sets, or side sets. The order of the values in the array correspond to the order in which the element blocks, node sets, or side sets were introduced into the file. Before this function is invoked, memory must be allocated for the returned array of(num_elem_blk, num_node_sets, or {num_side_sets}) integer values.

This function can be used in place of

- ex_get_elem_blk_ids(),
- ex_get_node_set_ids(), and
- ex_get_side_set_ids() to get element block, node set, and side set IDs, respectively, by requesting the property name ID. One should also note that this same function can be accomplished with multiple calls to ex_get_prop().

Returns
  In case of an error, ex_get_prop_array() 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.
  - a warning value is returned if a property with the specified name is not found.

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.
  [in] | prop_name | The name of the property (maximum length of `MAX_STR_LENGTH` ) for which the values are desired.
  [out] | values | Returned array of property values.

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

For an example of code to read an array of object properties, refer to the description for ex_get_prop_names().