PK_PART_receive_u   

PK_ERROR_code_t             PK_PART_receive_u
(
--- received arguments ---
const PK_UCHAR_t           *key,         --- key string
const PK_PART_receive_o_t  *options,     --- receive options

--- returned arguments ---
int                  *const n_parts,     --- number of parts received
PK_PART_t           **const parts        --- parts received
)


This function receives one or more parts using the given Unicode key string.


Specific Errors:
    PK_ERROR_bad_key               Frustrum (UCOPRD) returned FR_bad_name
                                   (MILD)
    PK_ERROR_key_not_found         Frustrum (UCOPRD) returned FR_not_found
                                   (MILD)
    PK_ERROR_cant_open_file        Frustrum (UCOPRD) returned FR_open_fail
                                   (MILD)
    PK_ERROR_file_access_error     Error reading or closing the transmit file
                                   (MILD)
    PK_ERROR_schema_access_error   Error opening, closing, or reading the
                                   schema file (MILD)
    PK_ERROR_schema_corrupt        Contents of schema file not as expected
                                   (MILD)
    PK_ERROR_schema_incompatible   Schema contents in newer format (MILD)
    PK_ERROR_wrong_format          File does not have expected transmit
                                   format (MILD)
    PK_ERROR_wrong_version         File transmitted by incompatible version
                                   of modeller (MILD)
    PK_ERROR_corrupt_file          Invalid transmit file contents (MILD)
    PK_ERROR_file_read_corruption  Corrupt data read, perhaps an NFS problem
                                   (MILD)
    PK_ERROR_applio_not_registered Application i/o functions not registered
                                   (only relevant if options->transmit_format
                                   is PK_transmit_format_applio) (MILD)
    PK_ERROR_size_mismatch         Transmitted parts created with different
                                   modeller resolution settings (MILD)
    PK_ERROR_attr_defn_mismatch    Transmitted attribute definitions do not
                                   match current ones (MILD)
    PK_ERROR_usfd_mismatch         File has incompatible user-field size (MILD)
    PK_ERROR_withdrawn_surface     File contains a withdrawn blend surface
                                   (MILD)
    PK_ERROR_FG_receive_failure    Part contains irretrievable foreign
                                   geometry (MILD)
    PK_ERROR_bad_field_conversion  Part contains data not convertible to
                                   current format (MILD)
    PK_ERROR_facet_geometry        A part contains facet geometry but facet
                                   geometry is not enabled in the session
                                   (MILD)
    PK_ERROR_mixed_geometry        A part contains mixed facet and classic
                                   geometry (MILD)
    PK_ERROR_lattice_geometry      A part contains a lattice but facet
                                   geometry is not enabled in the session
                                   (MILD)

If options->transmit_format is PK_transmit_format_indexio_c:

    PK_ERROR_indexio_not_registered
                                   Application i/o functions not registered
                                   (MILD)
    PK_ERROR_xt_data_not_indexed   XT data was not transmitted using
                                   PK_transmit_format_indexio_c (MILD)
    PK_ERROR_bad_index             The index of a part is out of range (MILD)
    PK_ERROR_bad_value             None or more than one identifier was given
                                   (MILD)
    PK_ERROR_not_found             The face identifier was not found (MILD)

If options->n_part_indices > 0:

    PK_ERROR_bad_index             The index of a part is out of range or
                                   does not correspond to a compound body
                                   (MILD)
    PK_ERROR_not_found             The child body identifier was not found
                                   (MILD)


Before this function can be used, it must be enabled by calls to
PK_SESSION_set_unicode and then PK_SESSION_register_frustrum and/or
PK_SESSION_register_applio, or by call to PK_SESSION_register_indexio.

The Unicode key is passed to the frustrum to identify the 'file' used to
receive the parts.

The parts are returned in the same order that they were transmitted by
PART transmit.

The registered frustrum routine UCOPRD is called with guise FFCXMT
(transmit file containing parts).

The transmit format option affects the format argument to UCOPRD as follows:

    transmit format                 format

    PK_transmit_format_text_c       FFTEXT
    PK_transmit_format_binary_c     FFBNRY
    PK_transmit_format_neutral_c    FFBNRY
    PK_transmit_format_applio_c    (function 'open_uc_rd' is called -
                                    see PK_SESSION_register_applio)
    PK_transmit_format_indexio_c   (function 'ucoprd' is called -
                                    see PK_SESSION_register_indexio)

If the 'receive_user_fields' option is set to true, user-fields will be
received from the transmit file, if they are present in the file. If the
user-field size in the transmit file is non-zero, but not the same as the
user-field size in the session, the error PK_ERROR_usfd_mismatch will be
returned.

If the 'receive_user_fields' option is set to false, and user fields are in use
in the session, received entities will have their user fields set to zero.

When a part is created the modeller stores in the part the current values for
the linear and angular resolution of the modeller and these values will be
saved with the part in a transmit file. If the resolution values saved with the
part are different from the current values, PK_ERROR_size_mismatch will be
returned.

The definitions of any attributes attached to a part are stored with a part in
the file. When a part is received the modeller may discover a mismatch between
an existing attribute definition and a stored definition with the same
identifier. If this occurs PK_ERROR_attr_defn_mismatch will be returned.

If the transmit file was transmitted by a version of the modeller which is
newer than the current version, PK_ERROR_wrong_version will be returned.

If the parts contain foreign geometry for which an evaluator is not available,
the offending surfaces or curves are identified by having a system attribute
of type SDL/TYSA_BAD_FG attached. Parts containing such geometry must not be
used. This mechanism allows individual parts in a file to be used despite the
presence of other parts containing unusable foreign geometry. Applications
using foreign geometry must check for the presence of this attribute and
delete such parts.

See Receiving a part for more information.