# Synopsis

PDX_MSGT sgdx_GDXAttrsToModelEntities(long option, MDA_PTR step_rprnct_ptr, int step_model)

# Purpose

Populate attributes in the given STEP model with the GDX attributes.

# Description

Populate attributes such as label, color and level for curve/surface entities in the given STEP model with the GDX attributes.

Program traverse through STEP model and check for Curve/Surface entities, since GDX attributes are defined for Curve/Surface only.

For each STEP curve/surface entity, program gets color values from the corresponding GDX attribute entity and create a presentation style (curve/surface style) entity. Then it creates a STYLED_ITEM using the presentation style entity and its parent Edge_Curve/Face entity.

Program gets layer name for curve/surface entity and stores layer name and list of entities with the same layer name. After traversing all entities, program creates a PRESENTATION_LAYER_PRESENTATION entity for each layer. Program stores created STYLED_ITEMs in a list and uses that to create a MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION entity. Program avoids color/presentation style entity duplication by checking the color values of the existing color entities. Program also checks the list of layers before creating new layer entity.

# Input

## option

Options (not used)

## step_rprnct_ptr

Representation context entity MDA ptr needed for MDGPR entity creation.

## step_model

STEP model containing entities acquiring attributes

# Return

          SGDX_NOERR
          Low Level error return
          .fi