ITK Function Reference

(12.1)
Modules | Functions
Appearances

Modules

 Errors
 

Functions

APPR_API int APPR_ask_all_attr_values (tag_t appearance, int *n_values, char ***attrnames, char ***attrvalues)
 
APPR_API int APPR_ask_appr_root (tag_t appearance, tag_t *appr_root)
 
APPR_API int APPR_ask_attr_list (int *n_attrdefs, tag_t **attrdefs)
 
APPR_API int APPR_ask_attr_mapping (tag_t mapping, int *n_notetypes, tag_t **notetypes, int *n_attrdefs, tag_t **attrdefs)
 
APPR_API int APPR_ask_attr_mapping_as_string (tag_t mapping, char **mappingAsString)
 
APPR_API int APPR_ask_attr_mappings (int *n_mappings, tag_t **mappings)
 
APPR_API int APPR_ask_attr_name (tag_t attrdef, char **name)
 
APPR_API int APPR_ask_attr_value (tag_t appearance, tag_t attrdef, char **value)
 
APPR_API int APPR_ask_attr_values (tag_t appearance, int *n_values, char ***attrnames, char ***attrvalues)
 
APPR_API int APPR_ask_component_bom_view (tag_t appearance, tag_t *component_bom_view)
 
APPR_API int APPR_ask_component_item (tag_t appearance, tag_t *component_item)
 
APPR_API int APPR_ask_is_valid (tag_t appearance, date_t date, logical check_unit_no, int unit_no, logical *verdict)
 
APPR_API int APPR_ask_mapping_external (tag_t mapping, logical *external)
 
APPR_API int APPR_ask_named_attr_values (tag_t appearance, int n_values, const char **attrnames, char ***attrvalues)
 
APPR_API int APPR_ask_occurrence (tag_t appearance, tag_t *occurrence)
 
APPR_API int APPR_ask_parent (tag_t appearance, tag_t *parent)
 
APPR_API int APPR_ask_transform (tag_t appearance, double **xform_data)
 
APPR_API int APPR_ask_validity_dates (tag_t appearance, date_t *in_date, date_t *out_date, logical *is_null)
 
APPR_API int APPR_ask_validity_max_date (date_t *validity_max_date)
 
APPR_API int APPR_ask_validity_max_unit_no (int *validity_max_unit_no)
 
APPR_API int APPR_ask_validity_min_date (date_t *validity_min_date)
 
APPR_API int APPR_ask_validity_min_unit_no (int *validity_min_unit_no)
 
APPR_API int APPR_ask_validity_unit_nos (tag_t appearance, int *in_unit_no, int *out_unit_no, logical *is_null)
 
APPR_API int APPR_create_attr_mapping (int n_notetypes, tag_t *notetypes, int n_attrdefs, tag_t *attrdefs, logical external, tag_t *mapping)
 
APPR_API int APPR_create_import_updater (date_t when, tag_t release_status, int n_item_revs, tag_t *item_revs, tag_t *updater)
 
APPR_API int APPR_create_incr_updater (tag_t release_status, tag_t incr_rev, tag_t *updater)
 
APPR_API int APPR_create_pre_release_updater (tag_t release_status, int n_item_revs, tag_t *item_revs, tag_t *updater)
 
APPR_API int APPR_create_updater (tag_t release_status, int n_item_revs, tag_t *item_revs, tag_t *updater)
 
APPR_API int APPR_create_working_updater (tag_t *updater)
 
APPR_API int APPR_define_attr (const char *name, tag_t *attrdef)
 
APPR_API int APPR_delete_instances_of_attr (tag_t attrdef)
 
APPR_API int APPR_extent (tag_t appearance_root, logical search_on_parent_appearance, tag_t parent_appearance, logical search_on_occurrence_thread, tag_t occurrence_thread, tag_t component_item, logical search_on_component_bom_view, tag_t component_bom_view, date_t date, logical search_on_unit_number, int unit_number, tag_t query, int num_query_entries, char **query_entries, char **query_values, int num_ics_classes, char **ics_class_names, int num_ics_entries, int *ics_uncts, char **ics_values, int ics_options, int num_mapped_attrs, char **mapped_attr_names, char **mapped_attr_values, int num_filter_appearances, tag_t *filter_appearances, int *num_appearances, tag_t **appearances)
 
APPR_API int APPR_find_attr (const char *attrname, tag_t *attrdef)
 
APPR_API int APPR_find_attr_mapping (int n_notetypes, tag_t *notetypes, int n_attrdefs, tag_t *attrdefs, tag_t *mapping)
 
APPR_API int APPR_process_import_updates ()
 
APPR_API int APPR_root_ask_bom_view (tag_t appr_root, tag_t *bom_view)
 
APPR_API int APPR_root_ask_config_context (tag_t appr_root, tag_t *config_context)
 
APPR_API int APPR_root_ask_config_mode (tag_t appr_root, int *config_mode)
 
APPR_API int APPR_root_ask_revision_rule (tag_t appr_root, tag_t *revision_rule)
 
APPR_API int APPR_root_ask_root_item (tag_t appr_root, tag_t *root_item)
 
APPR_API int APPR_root_ask_root_item_info (tag_t appr_root, tag_t *root_item_info)
 
APPR_API int APPR_root_create (tag_t root_item, tag_t bom_view, tag_t revision_rule, logical has_spatial_data, tag_t *appr_root)
 
APPR_API int APPR_root_delete (tag_t appr_root)
 
APPR_API int APPR_root_extent (tag_t root_item, tag_t bom_view, tag_t revision_rule, int *num_appr_roots, tag_t **appr_roots)
 
APPR_API int APPR_root_extent_approx_rr (tag_t root_item, tag_t bom_view, tag_t revision_rule, int *num_appr_roots, tag_t **appr_roots)
 
APPR_API int APPR_set_attr_mapping (tag_t mapping, int n_notetypes, tag_t *notetypes, int n_attrdefs, tag_t *attrdefs)
 
APPR_API int APPR_set_attr_value (tag_t appearance, tag_t attrdef, const char *value)
 
APPR_API int APPR_set_mapping_external (tag_t mapping, logical external)
 

Appearance configuration modes

Returned by APPR_root_ask_config_mode()

#define APPR_cfg_mode_rel_date   0
 
#define APPR_cfg_mode_date_eff   1
 
#define APPR_cfg_mode_unit_eff   2
 
#define APPR_cfg_mode_unit_plus_rdate   3
 
#define APPR_cfg_mode_working_data   4
 

Mapped attribute prefixes to allow more than just equality when searching

APPR_API const char * APPR_get_APPR_attr_op_case_insensitive ()
 
APPR_API const char * APPR_get_APPR_attr_op_like ()
 
APPR_API const char * APPR_get_APPR_attr_op_not_like ()
 
APPR_API const char * APPR_get_APPR_attr_op_null ()
 
APPR_API const char * APPR_get_APPR_attr_op_not_null ()
 
APPR_API const char * APPR_get_APPR_attr_op_ge ()
 
APPR_API const char * APPR_get_APPR_attr_op_le ()
 
APPR_API const char * APPR_get_APPR_attr_op_ne ()
 
APPR_API const char * APPR_get_APPR_attr_op_eq ()
 
APPR_API const char * APPR_get_APPR_attr_op_gt ()
 
APPR_API const char * APPR_get_APPR_attr_op_lt ()
 

Detailed Description

Macro Definition Documentation

#define APPR_cfg_mode_date_eff   1

Definition at line 32 of file appr.h.

#define APPR_cfg_mode_rel_date   0

Definition at line 31 of file appr.h.

#define APPR_cfg_mode_unit_eff   2

Definition at line 33 of file appr.h.

#define APPR_cfg_mode_unit_plus_rdate   3

Definition at line 34 of file appr.h.

#define APPR_cfg_mode_working_data   4

Definition at line 35 of file appr.h.

Function Documentation

APPR_API int APPR_ask_all_attr_values ( tag_t  appearance,
int *  n_values,
char ***  attrnames,
char ***  attrvalues 
)

Returns the values of the every attribute of an appearance. Attributes that have no value for a given appearance will return an empty string.

Parameters
appearance(I) Appearance being queried.
n_values(O) Number of attributes.
attrnames(OF) n_values Names of the attributes.
attrvalues(OF) n_values Values of the attributes.
APPR_API int APPR_ask_appr_root ( tag_t  appearance,
tag_t appr_root 
)

Gives the appearance root of the appearance.

Parameters
appearance(I) Tag of the appearance.
appr_root(O) Tag of the appearance root.
APPR_API int APPR_ask_attr_list ( int *  n_attrdefs,
tag_t **  attrdefs 
)

Returns definitions for all mapped appearance attributes.

Parameters
n_attrdefs(O) Number of attributes.
attrdefs(OF) n_attrdefs Array of attribute definitions.
APPR_API int APPR_ask_attr_mapping ( tag_t  mapping,
int *  n_notetypes,
tag_t **  notetypes,
int *  n_attrdefs,
tag_t **  attrdefs 
)

For a given mapping, this function returns a list of occurrence note types and the appearance attributes that they map onto.

Parameters
mapping(I) Mapping being queried.
n_notetypes(O) Number of occurrence note types in the mapping.
notetypes(OF) n_notetypes Array of note types in the mapping.
n_attrdefs(O) Number of attributes in the mapping.
attrdefs(OF) n_attrdefs Array of attribute definitions in the mapping.
APPR_API int APPR_ask_attr_mapping_as_string ( tag_t  mapping,
char **  mappingAsString 
)

For a given mapping, this function returns its string representation.

Parameters
mapping(I) Mapping being queried.
mappingAsString(OF) Number of occurrence note types in the mapping.
APPR_API int APPR_ask_attr_mappings ( int *  n_mappings,
tag_t **  mappings 
)

Returns a list of all appearance attribute mappings.

Parameters
n_mappings(O) Number of occurrence note types in the mapping.
mappings(OF) n_mappings Array of note types in the mapping.
APPR_API int APPR_ask_attr_name ( tag_t  attrdef,
char **  name 
)

Returns the name of the given attribute.

Parameters
attrdef(I) Definition of the attribute being queried.
name(OF) Name of the attribute.
APPR_API int APPR_ask_attr_value ( tag_t  appearance,
tag_t  attrdef,
char **  value 
)

Returns the value of the given attribute of an appearance.

Parameters
appearance(I) Appearance being queried.
attrdef(I) Definition of the attribute being queried.
value(OF) Value of the attribute.
APPR_API int APPR_ask_attr_values ( tag_t  appearance,
int *  n_values,
char ***  attrnames,
char ***  attrvalues 
)

Returns the values of the all set attributes of an appearance. Attributes which have not had a value set are not returned.

Parameters
appearance(I) Appearance being queried.
n_values(O) Number of attributes that have a value.
attrnames(OF) n_values Names of the attributes that have a value.
attrvalues(OF) n_values Values of the attributes.
APPR_API int APPR_ask_component_bom_view ( tag_t  appearance,
tag_t component_bom_view 
)

Gives the component bom view referenced by the appearance.

Parameters
appearance(I) Tag of the appearance.
component_bom_view(O) Tag of the component bom view.
APPR_API int APPR_ask_component_item ( tag_t  appearance,
tag_t component_item 
)

Gives the component item referenced by the appearance.

Parameters
appearance(I) Tag of the appearance.
component_item(O) Tag of the component item.
APPR_API int APPR_ask_is_valid ( tag_t  appearance,
date_t  date,
logical  check_unit_no,
int  unit_no,
logical verdict 
)

See if the Appearance is valid for the given date and/or unit-no. If checking against date and unit-no, it must be valid for both, i.e. it is an AND, not an OR.

Parameters
appearance(I) Tag of the appearance.
date(I) The value to match against the validity date-range; that is, the Appearance's in-date must be less than or equal to the given date, and its out-date must be greater than the given date. Ignored if NULLDATE.
check_unit_no(I) If check_unit_no is true, unit_no supplies the value to match against the validity unit-no-range; that is, the Appearance's in-unit-no must be less than or equal to the given unit-no, and its out-unit-no must be greater than the given unit-no.
unit_no(I)
verdict(O) True if the appearance is valid for the given input criteria.
APPR_API int APPR_ask_mapping_external ( tag_t  mapping,
logical external 
)

Returns a flag indicating whether or not the given mapping will invoke the mapping user exit.

Parameters
mapping(I) Mapping being queried.
external(O) Set to true if the user exit will be invoked.
APPR_API int APPR_ask_named_attr_values ( tag_t  appearance,
int  n_values,
const char **  attrnames,
char ***  attrvalues 
)

Returns the values of the named appearance attributes.

Parameters
appearance(I) Appearance being queried.
n_values(I) Number of attributes being queried.
attrnames(I) n_values Array of names of attributes being queried.
attrvalues(OF) n_values Values of the named attributes.
APPR_API int APPR_ask_occurrence ( tag_t  appearance,
tag_t occurrence 
)

Gives the occurrence represented by this appearance.

Parameters
appearance(I) Tag of the appearance.
occurrence(O) Tag of the appearances’s occurrence.
APPR_API int APPR_ask_parent ( tag_t  appearance,
tag_t parent 
)

Gives the appearance’s parent, i.e. the next-higher appearance in the structure.

Parameters
appearance(I) Tag of the appearance.
parent(O) Tag of the appearance's parent appearance.
APPR_API int APPR_ask_transform ( tag_t  appearance,
double **  xform_data 
)

Gives the absolute positional transformation matrix for this appearance.

Parameters
appearance(I) Tag of the appearance.
xform_data(OF) 16 A 16-element array giving the transform in PLM XML format.
APPR_API int APPR_ask_validity_dates ( tag_t  appearance,
date_t in_date,
date_t out_date,
logical is_null 
)

Gives the range of dates for which the given appearance is valid.

Parameters
appearance(I) Tag of the appearance.
in_date(O) Date on which the appearance becomes valid.
out_date(O) Date from which the appearance is no longer valid.
is_null(O) True if the appearance is not valid for any date (in which case the values of in_date and out_date are undefined).
APPR_API int APPR_ask_validity_max_date ( date_t validity_max_date)

Gives the predefined maximum value for appearance date validity. This is used to mean ‘open ended date validity’.

Note
As this function is very simple it is deliberately not journaled.
Parameters
validity_max_date(O) Maximum value for appearance date validity.
APPR_API int APPR_ask_validity_max_unit_no ( int *  validity_max_unit_no)

Gives the predefined maximum value for appearance unit number validity. This is used to mean ‘open ended unit number validity’.

Note
As this function is very simple it is deliberately not journaled.
Parameters
validity_max_unit_no(O) Maximum value for appearance unit number validity.
APPR_API int APPR_ask_validity_min_date ( date_t validity_min_date)

Gives the predefined minimum value for appearance date validity. This is used to mean ‘open initial date’.

Note
As this function is very simple it is deliberately not journaled.
Parameters
validity_min_date(O) Minimum value for appearance date validity.
APPR_API int APPR_ask_validity_min_unit_no ( int *  validity_min_unit_no)

Gives the predefined minimum value for appearance unit number validity. This is used to mean ‘open initial unit number validity’.

Note
As this function is very simple it is deliberately not journaled.
Parameters
validity_min_unit_no(O) Minimum value for appearance unit number validity.
APPR_API int APPR_ask_validity_unit_nos ( tag_t  appearance,
int *  in_unit_no,
int *  out_unit_no,
logical is_null 
)

Gives the range of unit numbers for which the given appearance is valid.

Parameters
appearance(I) Tag of the appearance.
in_unit_no(O) Unit number at which the appearance becomes valid.
out_unit_no(O) Unit number from which the appearance is no longer valid.
is_null(O) True if the appearance is not valid for any unit number (in which case the values of in_unit_no and out_unit_no are undefined).
APPR_API int APPR_create_attr_mapping ( int  n_notetypes,
tag_t notetypes,
int  n_attrdefs,
tag_t attrdefs,
logical  external,
tag_t mapping 
)

Creates a new mapping for transferring occurrence note data onto appearance attributes.

Parameters
n_notetypes(I) Number of occurrence note types in the mapping.
notetypes(I) n_notetypes Array of note types in the mapping.
n_attrdefs(I) Number of attributes in the mapping.
attrdefs(I) n_attrdefs Array of attribute definitions in the mapping.
external(I) Set this to true to invoke the mapping user exit for this mapping.
mapping(O) New mapping.
APPR_API int APPR_create_import_updater ( date_t  when,
tag_t  release_status,
int  n_item_revs,
tag_t item_revs,
tag_t updater 
)

Creates an update-on-import package with release status and a list of item revisions that have been imported and have that release status instance. This package is placed on the primary queue for processing by the update manager. This function is called by the APPR-update-from-targets handler supplied out of the box, but may be called from custom handlers.

Parameters
when(I)
release_status(I)
n_item_revs(I)
item_revs(I) n_item_revs
updater(O)
APPR_API int APPR_create_incr_updater ( tag_t  release_status,
tag_t  incr_rev,
tag_t updater 
)

Creates an update package with release status and a Incremental Change Revision that have been released with that release status instance. This package is placed on the primary queue for processing by the update manager. This function is called by the APPR-update-from-targets handler supplied out of the box, but may be called from custom handlers.

Parameters
release_status(I)
incr_rev(I) IncrementalChangeRevision
updater(O)
APPR_API int APPR_create_pre_release_updater ( tag_t  release_status,
int  n_item_revs,
tag_t item_revs,
tag_t updater 
)

Creates an update-for-pre-release package with release status and a list of item revisions that have been released with that release status instance. This package is placed on the primary queue for processing by the update manager. This function is called by the APPR-update-from-targets handler supplied out of the box, but may be called from custom handlers.

Parameters
release_status(I)
n_item_revs(I)
item_revs(I) n_item_revs
updater(O)
APPR_API int APPR_create_updater ( tag_t  release_status,
int  n_item_revs,
tag_t item_revs,
tag_t updater 
)

Creates an appearances updater package with a release status and a list of item revisions that have been released with the given release status. This package is queued for processing under control of the Appearance Update Manager.

Restrictions:

The item revisions added to the updater must have a release status that is the same as that of the updater.

Parameters
release_status(I) The release status applied to the changed item revisions.
n_item_revs(I) The number of changed item revisions to be added to the updater.
item_revs(I) n_item_revs Tags of the changed item revisions.
updater(O) The newly created appearances updater.
APPR_API int APPR_create_working_updater ( tag_t updater)

Creates a working update package on the queue for the updater to process

Parameters
updater(O)
APPR_API int APPR_define_attr ( const char *  name,
tag_t attrdef 
)

Defines a new appearance attribute.

Parameters
name(I) Unique name for this appearance attribute.
attrdef(O) Definition of the new attribute.
APPR_API int APPR_delete_instances_of_attr ( tag_t  attrdef)

Deletes all instances of the given appearance attribute. This function must be invoked before attempting to delete an attribute definition. Failure to call this will result in POM’s referential integrity rules refusing to delete the definition.

Parameters
attrdef(I) Definition of the attribute whose instances should be deleted.
APPR_API int APPR_extent ( tag_t  appearance_root,
logical  search_on_parent_appearance,
tag_t  parent_appearance,
logical  search_on_occurrence_thread,
tag_t  occurrence_thread,
tag_t  component_item,
logical  search_on_component_bom_view,
tag_t  component_bom_view,
date_t  date,
logical  search_on_unit_number,
int  unit_number,
tag_t  query,
int  num_query_entries,
char **  query_entries,
char **  query_values,
int  num_ics_classes,
char **  ics_class_names,
int  num_ics_entries,
int *  ics_uncts,
char **  ics_values,
int  ics_options,
int  num_mapped_attrs,
char **  mapped_attr_names,
char **  mapped_attr_values,
int  num_filter_appearances,
tag_t filter_appearances,
int *  num_appearances,
tag_t **  appearances 
)

Find all Appearances matching the all the given criteria, i.e. the individual criteria are ANDed together.

Parameters
appearance_root(I) Identifies the appearance set to which matching appearances must belong. The appearance root object can be looked up from its identifying combination of tracked item, view of tracked item, and context revision rule using APPR_root_extent. Ignored if set to NULLTAG.
search_on_parent_appearance(I) If search_on_parent_appearance is true, the value of parent_appearance will be matched against appearances’ parent appearance reference. Note that NULLTAG is a valid value (for the root-level appearance of the appearance set).
parent_appearance(I)
search_on_occurrence_thread(I) If search_on_occurrence_thread is true, will attempt to match appearances representing this occurrence_thread.
Note
NULLTAG is a valid value for occurrence_thread (for the root-level appearance of the appearance set).

Occurrence thread is the same value as passed to the occurrence argument of PS ITK functions, it is carried over for the same ‘logical’ occurrence from one parent BVR to the next.

Parameters
occurrence_thread(I)
component_item(I) Searches for appearances having this item as component. Ignored if NULLTAG.
search_on_component_bom_view(I) If search_on_component_bom_view is true, searches for appearances referencing component_bom_view as the view of their component item. Note that NULLTAG is a valid value for component_bom_view (for "leaf node" appearances).
component_bom_view(I)
date(I) Searches for appearances valid at the given date and time. Ignored if NULLDATE.
search_on_unit_number(I) If search_on_unit_number is true, searches for appearances valid for the unit number specified by the following argument unit_number.
unit_number(I)
query(I) The tag of a Saved Query (see QRY_ module) that should return either a list of Items or a list of Item Revisions to be used as matches for the component_item attribute. If the query returns Items, it is simply merged with the other supplied citeria; if it returns Item Revisions, then it is run separately, the Item Revisions are filtered down to the configured ones and their Items are used as an explicit list of matches for the component_item attribute.
Note
Using an Item Revision query is considerably slower than using an Item query, and is generally not recommended.

A query that returns anything else is rejected.

This argument is ignored if NULLTAG.

Parameters
num_query_entries(I) Arrays (of length num_query_entries) of { entry-name, entry-value } pairs that are passed as parameters to the Saved Query specified by the preceding query argument. Ignored if query is NULLTAG or if num_query_entries is 0.
query_entries(I) num_query_entries
query_values(I) num_query_entries
num_ics_classes(I) An array (of length num_ics_classes) of Classification class or subclass names. A subclass name must be in the format of "class name"::"subclass name".
ics_class_names(I) num_ics_classes
num_ics_entries(I) Arrays (of length num_ics_entries) of { attribute id, value } pairs to match against attributes of the above Classification classes or subclasses.
ics_uncts(I) num_ics_entries
ics_values(I) num_ics_entries
ics_options(I) The Classification class query option. If ics_options is equal to SML_ENQ_SEARCH_THIS_CLASS_ONLY, the search will be restricted to the given class(es) only. Otherwise, the search will be done in all the classes to which the given class(es) is/are an ancestor.
num_mapped_attrs(I) Arrays (of length num_mapped_attrs) of { name, value } pairs to match with the mapped attributes (those attributes which do not form original data on the Appearance but instead are copied from the Occurrence). Ignored if num_mapped_attrs is 0.
mapped_attr_names(I) num_mapped_attrs
mapped_attr_values(I) num_mapped_attrs
num_filter_appearances(I) An array (of length num_filter_appearances) of appearances against which to filter the result of the database query. That is, the final returned appearances are the intersection of the query result with this list. Ignored if num_filter_appearances is 0.
filter_appearances(I) num_filter_appearances
num_appearances(O) Outputs an array (of length num_appearances) which is the set of appearances matching all the given search criteria.
appearances(OF) num_appearances
APPR_API int APPR_find_attr ( const char *  attrname,
tag_t attrdef 
)

Returns the definition for the named appearance attribute.

Parameters
attrname(I) Name of attribute to find.
attrdef(O) Attribute definition.
APPR_API int APPR_find_attr_mapping ( int  n_notetypes,
tag_t notetypes,
int  n_attrdefs,
tag_t attrdefs,
tag_t mapping 
)

Searches for an appearance attribute mapping with the given notetypes onto the given appearances attributes.

Parameters
n_notetypes(I) Number of occurrence note types.
notetypes(I) n_notetypes Array of note types to search for.
n_attrdefs(I) Number of attributes.
attrdefs(I) n_attrdefs Array of attribute definitions to search for.
mapping(O) Mapping found, or NULLTAG if no mapping is found.
APPR_API const char* APPR_get_APPR_attr_op_case_insensitive ( )
APPR_API const char* APPR_get_APPR_attr_op_eq ( )
APPR_API const char* APPR_get_APPR_attr_op_ge ( )
APPR_API const char* APPR_get_APPR_attr_op_gt ( )
APPR_API const char* APPR_get_APPR_attr_op_le ( )
APPR_API const char* APPR_get_APPR_attr_op_like ( )
APPR_API const char* APPR_get_APPR_attr_op_lt ( )
APPR_API const char* APPR_get_APPR_attr_op_ne ( )
APPR_API const char* APPR_get_APPR_attr_op_not_like ( )
APPR_API const char* APPR_get_APPR_attr_op_not_null ( )
APPR_API const char* APPR_get_APPR_attr_op_null ( )
APPR_API int APPR_process_import_updates ( )

Processes the import info that the above call stored.

APPR_API int APPR_root_ask_bom_view ( tag_t  appr_root,
tag_t bom_view 
)

Gives the view of the root item whose structure is tracked by this appearance root.

Parameters
appr_root(I) Tag of the appearance root.
bom_view(O) Tag of the appearance root’s root bom view.
APPR_API int APPR_root_ask_config_context ( tag_t  appr_root,
tag_t config_context 
)

The configuration-context object is a wrapper round the revision rule. It's only really needed if you want to delete it; otherwise you can always get directly to the revision rule using APPR_root_ask_revision_rule.

Parameters
appr_root(I) Tag of the appearance root.
config_context(O) The appearance root’s configuration context object.
APPR_API int APPR_root_ask_config_mode ( tag_t  appr_root,
int *  config_mode 
)

Determines the configuration mode of the appearance root: release date, date effectivity, unit effectivity, or unit effectivity + release date. The configuration mode depends on the contents of the context revision rule.

Parameters
appr_root(I) Tag of the appearance root.
config_mode(O) Configuration mode of the appearance root:
APPR_cfg_mode_rel_date
APPR_cfg_mode_date_eff
APPR_cfg_mode_unit_eff
APPR_cfg_mode_unit_plus_rdate
APPR_API int APPR_root_ask_revision_rule ( tag_t  appr_root,
tag_t revision_rule 
)

Gives the revisioin rule used to give the configuration context to this appearance root.

Parameters
appr_root(I) Tag of the appearance root.
revision_rule(O) Tag of the appearance root’s revision rule.
APPR_API int APPR_root_ask_root_item ( tag_t  appr_root,
tag_t root_item 
)

Gives the root item whose structure is tracked by this appearance root.

Parameters
appr_root(I) Tag of the appearance root.
root_item(O) Tag of the appearance root’s root item.
APPR_API int APPR_root_ask_root_item_info ( tag_t  appr_root,
tag_t root_item_info 
)

The root-item-info object is a wrapper round the root item and the bom view. It's only really needed if you want to delete it; otherwise you can always get directly to the root item and the bom view using APPR_root_ask_root_item and APPR_root_ask_bom_view.

Parameters
appr_root(I) Tag of the appearance root.
root_item_info(O) Tag of the appearance root’s root item info object.
APPR_API int APPR_root_create ( tag_t  root_item,
tag_t  bom_view,
tag_t  revision_rule,
logical  has_spatial_data,
tag_t appr_root 
)

Creates an appearance root, setting its root_item, bom_view and revision_rule attributes to the given arguments.

Note
This function does not save the new appearance root. Use AOM_save for that.
Parameters
root_item(I) Root item of the structure to be tracked by this appearance root.
bom_view(I) Indicates the view of root_item to be tracked by this appearance root.
revision_rule(I) Revision that sets the configuration context for this appearance root.
has_spatial_data(I) If set to true spatial data will be tracked for this appearance root.
appr_root(O) Gives the tag of the newly created appearance root.
APPR_API int APPR_root_delete ( tag_t  appr_root)

Destroy an AppearanceRoot and all associated data, including Appearances and update packages. Do not use lightly!

Note
If you merely want to destroy the AppearanceRoot alone, use AOM_delete.
Parameters
appr_root(I)
APPR_API int APPR_root_extent ( tag_t  root_item,
tag_t  bom_view,
tag_t  revision_rule,
int *  num_appr_roots,
tag_t **  appr_roots 
)

Find all AppearanceRoots with attributes matching all the given arguments. If any argument is NULLTAG, it is not matched against. So for example supplying all three as NULLTAG finds all AppearanceRoots.

Parameters
root_item(I) Search for appearance roots of the given root item. Ignored if NULLTAG.
bom_view(I) Search for appearance roots of this bom view (of end item). Ignored if NULLTAG
revision_rule(I) Search for appearance roots using this revision rule as their configuration context. Ignored if NULLTAG.
num_appr_roots(O) The number of appearances roots matching the input search criteria.
appr_roots(OF) num_appr_roots Tags of the appearance roots matching the input search criteria.
APPR_API int APPR_root_extent_approx_rr ( tag_t  root_item,
tag_t  bom_view,
tag_t  revision_rule,
int *  num_appr_roots,
tag_t **  appr_roots 
)

Find applicable approximately-matching appearance roots, i.e. given a { root_item, bom_view, rev-rule } triple, find an appearance root with the same root_item and bom_view, but with a rev-rule which is a suitable subset of the supplied rev-rule, in the sense that it matches the supplied rev-rule except that it lacks a date and/or unit-no entry.

Parameters
root_item(I) Search for appearance roots of the given root item.
bom_view(I) Search for appearance roots of this bom view (of end item).
revision_rule(I) Search for appearance roots having a configuration context revision rule that is a suitable subset of the given rule.
num_appr_roots(O) The number of appearances roots matching the input search criteria.
appr_roots(OF) num_appr_roots Tags of the appearance roots matching the input search criteria.
APPR_API int APPR_set_attr_mapping ( tag_t  mapping,
int  n_notetypes,
tag_t notetypes,
int  n_attrdefs,
tag_t attrdefs 
)

Changes an existing mapping to use the given list of occurrence note types and appearance attribute definitions.

Parameters
mapping(I) Mapping to update.
n_notetypes(I) Number of occurrence note types in the mapping.
notetypes(I) n_notetypes Array of note types in the mapping.
n_attrdefs(I) Number of attributes in the mapping.
attrdefs(I) n_attrdefs Array of attribute definitions in the mapping.
APPR_API int APPR_set_attr_value ( tag_t  appearance,
tag_t  attrdef,
const char *  value 
)

Sets the value of the given attribute of an appearance.

Parameters
appearance(I) Appearance being updated.
attrdef(I) Definition of the attribute to be set.
value(I) New value for the attribute.
APPR_API int APPR_set_mapping_external ( tag_t  mapping,
logical  external 
)

Controls whether or not the given mapping will invoke the mapping user exit.

Parameters
mapping(I) Mapping being queried.
external(I) Set this to true to invoke the user exit.