...
The ISO 10303-21 (STEP Physical File) defines UDE as follows:
An UDE instance is an instance of an entity that is neither part of the EXPRESS schema specified in the header section of a STEP Physical File (SPF) nor in the HEADER_SECTION_SCHEMA defining the Header section of a SPF.
The meaning of a UDE entity instance, and the number, data types and meaning of its attributes, is a matter of agreement between the partners using the exchange structure (SPF).
For more details about SPF see the following two documents:
- ISO 10303-21: Clear text encoding of the exchange structure.
- ISO 10303-21:1994/DAM 1 : Part 21: Implementation methods: Amendment 1
An UDE is defined in the EDM meta-meta model SDAI_DICTIONARY_MODEL as follows:
ENTITY user_defined_entity;
name : STRING;
attributes : OPTIONAL LIST OF PRIMITIVE_TYPE;
END_ENTITY;
TYPE PRIMITIVE_TYPE = SELECT
(application_instance,
UDE_AGGR_TYPE,
UDE_INTEGER_TYPE,
UDE_REAL_TYPE,
UDE_STRING_TYPE,
UDE_LOGICAL_TYPE,
UDE_BOOLEAN_TYPE,
UDE_BINARY_TYPE,
UDE_ENUMERATION_TYPE);
END_TYPE;
TYPE UDE_AGGR_TYPE = LIST OF PRIMITIVE_TYPE; END_TYPE;
TYPE UDE_INTEGER_TYPE = INTEGER; END_TYPE;
TYPE UDE_REAL_TYPE = REAL; END_TYPE;
TYPE UDE_STRING_TYPE = STRING; END_TYPE;
TYPE UDE_LOGICAL_TYPE = LOGICAL; END_TYPE;
TYPE UDE_BOOLEAN_TYPE = BOOLEAN; END_TYPE;
TYPE UDE_BINARY_TYPE = BINARY; END_TYPE;
TYPE UDE_ENUMERATION_TYPE = ENUMERATION OF
(ANY_STRING);
END_TYPE;
The entity named application_instance is defined in the Express schema named SDAI_ABSTRACT_DATATYPE_SCHEMA as follows:
ENTITY application_instance;
owning_model : sdai_model;
definition : entity_definition;
values : LIST OF attribute_value;
END_ENTITY;
NOTE:
The entity application_instance is never populated. An instanceID can be regarded as an instance of the entity application_instance.
The attribute user_defined_entity.name is the name of the UDE, i.e. the name that starts with an exclamation mark in the SPF.
Examples: !A_SPECIAL_ENTITY('ABC',123);( UDE in Header section. NAME = A_SPECIAL_ENTITY )
#12 = !MYCURVE(0.0,0.0,0.0,1.0);( UDE in Data section. NAME = !MYCURVE )
NOTE: exclamation mark is NOT part of the name.
The types UDE_AGGR_TYPE, UDE_INTEGER_TYPE, UDE_REAL_TYPE, UDE_STRING_TYPE, UDE_LOGICAL_TYPE, UDE_BOOLEAN_TYPE,UDE_BINARY_TYPE, and UDE_ENUMERATION_TYPE are implicitly known in all data models in EDM, hence instances of type UDE can be created and populated in all EDM data models with the standard EDMI operations as sdaiCreateInstanceBN, sdaiCreateInstance, sdaiGetEntityExtentBN, sdaiPutAttrBN, sdaiGetAttrBN, sdaiGetAggrByIterator, etc.
When an UDE instance exists in a model, the appropriate entity_extent instance will be found in the attribute Populated_folder in the Sdai_model_contents instance in the appropriate Sdai_model instance. The UDE Entity_extent instance will never be in the attribute Folder in the
Sdai_model_contents instance in the appropriate Sdai_model instance.
NOTE:
Since the aggregate type of 'attributes' is LIST, it cannot according to the standard contain unset elements. However, when transferring UDEs between partners the sequence of attributes has of course to be predefined, and there is a need to handle the fact that some values may be unset. EPM has overcome this obstacle by accepting the '$' sign as member of the 'attributes' aggregate for an UDE in a P21 file, in spite of the aggregate being a list. Furthermore a little snag is introduced to mimic unset elements for UDEs in SDAI. Since instance 0 is an illegal instance in EDM, it is used to denote an unset element in the 'attributes' aggregate for UDEs. We recommend to make use of a macro, for instance like the macro APPEND_UNSET_TO_LIST used in this demo, in order to increase readability. Note that all get functions generates the sdaiEVALUEUNSET status, when applied on this specific list , and an element of type sdaiINSTANCE with value 0 is detected. We DO emphasize that this behavior is true in the context of an UDE strictly; otherwise LISTs still of course "behave" according to the standard.