Advanced Customization > Business Logic Customization > Data Exchange using Standards in Windchill > STEP Data Exchange using EXPRESS > Implementing Templates > Function Categories > Get Functions
  
Get Functions
The following applies to Get functions:
An invocation of a Get function can result in no, one, or several hits.
When all arguments are supplied, none or one single hit is possible.
When all arguments are indeterminate (the value is ? which is similar to null in Java) all instances of that template type are returned (can be none).
When some of the arguments are supplied a Get function behaves as a search. In this case a function invocation returns an aggregate of those instances that match the input parameters (can also be none).
Section 1
If template extension instances have been initialized before (private or global flag is checked), the search section is entered. There is not any one recommended method/way to implement the search. The implementation all depends on the structure of the template.
Section 2
Section 2 is entered if template extension instances have not been initialized so far. If you look at get_representing_part, Section 2 starts with:
xpxGetEntityExtentBN (PLCSMODELID,'Part_view_definition',prod_def_bag);

REPEAT i := 1 TO SIZEOF(prod_def_bag);

.......
For example a loop over all instances of 'Part_view_definition' in the population. This is the “root” in the template, and there shall be one representing_part instance for each 'Part_view_definition' instance. Other template types have similar one-to-one correspondences between the “root” and the extension entity.
'Part_view_definition' instances that are not properly instantiated are silently skipped. If the population has been validated correctly beforehand such an event should never occur. An exception should have been thrown, or at least the instance should have been logged as a faulty one.
Population of the representing_part attributes
part_id
A part may have many alias identifications (like Part_name) in addition to the principal Part_identification_code, but in this context the list returned from get_assigning_identification is iterated over in order to find an identification that is classified as Part_identification_code or a possible subtype.
part_ver
A Part_version can have no more than one identification (one version id). Therefore the utility helper_get_one_assigning_identification is used to get this single version if any.
domain
The classifications attached to Part_view_definition.initial_context (View_definition_context) are obtained using the get_assigning_reference_data function. The one that is Discipline_domain (or subtype of it) are assigned to domain.
life_cycle_stage
The classifications attached to Part_view_definition.initial_context (View_definition_context) are obtained using the get_assigning_reference_data function. The one that is Life_cycle_stage (or subtype of it) are assigned to life_cycle_stage.
prt
The same as Part_view_definition.defined_version.of_product.
version
The same as Part_view_definition.defined_version.
view
is the Part_view_definition instance itself
contxt
The same as Part_view_definition.initial_context.
catgy
xpxGetEntityExtentBN is used to find the one single product category in the population.