# Synopsis

(macro) int step_GetEnumDefVal(int model, int ddf_value, int type)

# Purpose

Maps an enumerated type in a DDF to its corresponding #defined value in step_Interface.h.

# Description

The value of a STEP enumerated type, ddf_value, and a type identifier, type, (from step_Interface.h) are used to determine the corresponding #defined value in step_Interface.h. The type must be one of the #defined types within step_Interface.h. This clarifies what kind of enumeration is being evaluated. The types currently supported are: .nf STEP_CURVE_FORM STEP_SURFACE_FORM STEP_KNOT_SPEC STEP_REP_PREF STEP_TRANS_CODE STEP_TRIM_PREF STEP_UNIT_NAME STEP_UNIT_PREFIX .fi

This macro should be called wherever entity level operations on enumerated fields require conversion to the #defined values within step_Interface.h. The following example shows how the value of the curve_form field within a STEP b_spline_curve can be converted to the corresponding #defined value. The #defined value can then be used by SGDX functions that expect these enumerations in #defined form. Note that the type used for this example, STEP_CURVE_FORM, identifies the expected value as a form of a curve. .RS 3 .nf curve_form = step_GetEnumDDFVal (model, bspcr->curve_form, STEP_CURVE_FORM); .fi .RE

# Input

## model

The STEP model that owns the ddf

## ddf_value

The value of an enumerated type from a STEP DDF

## type

The type of enumeration being converted.

# Return

The corresponding #defined value (within step_Interface.h)