ITK Function Reference
(12.1) |
Data Structures | |
struct | USER_DATASET_details_s |
struct | USER_prop_init_entry_s |
Macros | |
#define | USER_DATASET_always_copy 0 |
#define | USER_DATASET_never_copy 1 |
#define | USER_DATASET_user_chooses 2 |
#define | USER_EXIT (EMH_UE_error_base + 1) |
Typedefs | |
typedef enum IDClass_e_obsolete | IDClass_e |
typedef enum IDFunc_e_obsolete | IDFunc_e |
typedef enum IDValid_t | IDValid_e |
typedef enum IVFType | IVFType_e |
typedef enum IVFType * | IVFType_ep |
typedef struct USER_DATASET_details_s * | USER_DATASET_details_p_t |
typedef struct USER_DATASET_details_s | USER_DATASET_details_t |
typedef struct USER_prop_init_entry_s | USER_prop_init_entry_t |
Enumerations | |
enum | IDClass_e_obsolete { ID_BAD_CLASS, ID_WORKING, ID_OFFICIAL } |
enum | IDFunc_e_obsolete { ID_BAD_FUNC, ID_SAVEAS, ID_CREATE, ID_FREEZE } |
enum | IDValid_t { USER_valid_id, USER_invalid_id, USER_modified_id, USER_override_id, USER_duplicate_id } |
enum | IVFType { IVF_BAD_TYPE, IVF_PRODUCT, IVF_STRUCTURE_GROUP, IVF_COMPONENT } |
Functions | |
USER_EXITS_API void | NOTE_ask_extension (char *file_name, char *extension) |
USER_EXITS_API int | USER_add_canned_methods (void) |
USER_EXITS_API int | USER_appr_item_is_above_ERCT (tag_t appr_context, tag_t item_tag, logical *is_above_erct) |
USER_EXITS_API int | USER_ask_display_revisions (tag_t item_tag, int *count, tag_t **revisions) |
USER_EXITS_API char * | USER_ask_for_new_sequence_no (tag_t parent_bom_revision) |
USER_EXITS_API int | USER_ask_new_default_sequence_number (tag_t parent_bom_rev, tag_t item, char **sequence_number) |
USER_EXITS_API int | USER_ask_new_seqno (tag_t parent_bom_rev, tag_t item, char **seqn_number) |
USER_EXITS_API int | USER_ask_seq_numbers (tag_t parent_bvr, int count, tag_t *child, char ***seq_numbers) |
USER_EXITS_API int | USER_baseline_dryrun_validator (const char *baseRevListFullFileName) |
USER_EXITS_API int | USER_bomline_is_preferred_ancestor (tag_t bomline_or_appearance, logical is_bomline, logical *is_preferred_ancestor) |
USER_EXITS_API int | USER_build_notify_message (const TcSubscriptionActionMsg_t *theSubscriptionMsg, char **messageSubject, int *nMessageLines, char ***messageLines) |
USER_EXITS_API int | USER_build_notify_message_with_locale (const TcSubscriptionActionMsg_t *theSubscriptionMsg, const char *localeStr, char **messageSubject, int *nMessageLines, char ***messageLines) |
USER_EXITS_API int | USER_classification_autocompute_attr () |
USER_EXITS_API int | USER_compute_effectivity (tag_t blTag, logical intersectConfigEff, logical *occEffExists, logical *isConfigured, int *effyCount, WSOM_effectivity_info_t ***effectivityInfo) |
USER_EXITS_API int | USER_copied_dataset_name (tag_t old_owner, tag_t old_dataset, tag_t relation_type, tag_t new_owner, char **dataset_name, logical *modifiable) |
USER_EXITS_API int | USER_copied_datasets_details (tag_t old_revision, const char *new_item_id, const char *new_revision_id, const char *new_item_type, int dataset_count, tag_t dataset_list[], USER_DATASET_details_t **details, logical *allow_duplicates) |
USER_EXITS_API int | USER_execute_saved_query (const char *name, int num_args, char **keys, char **values, int *num_found, tag_t **found) |
USER_EXITS_API int | USER_exit_module (void) |
USER_EXITS_API int | USER_get_keyword_search_client (const char *name, int num_args, char **names, char **values, char **search_client) |
USER_EXITS_API int | USER_gs_shell_init_module (void) |
USER_EXITS_API int | USER_init_module (void) |
USER_EXITS_API void | USER_invoke_pdm_server (int input_code, char *input_string, int *output_code, char **output_string) |
USER_EXITS_API int | USER_invoke_user_code_string (int input_code, const char *input_string, int *output_code, char **output_string) |
USER_EXITS_API int | USER_invoke_user_code_taglist (int input_code, const char *input_string, tag_t input_tag, tag_t *output_tag, char **output_string, int *output_count, tag_t **output_taglist) |
USER_EXITS_API int | USER_invoke_user_create_objs (tag_t tag, char *form_name, char *num_of_cost_elem, const char *plant, char *currency, char *lead_time, char *supplier, char *percentage, char *titles, char *element_vals, char *ar_number, char *sender_psp, char *receiver_psp, char *sap_index, char *sap_date, char *sap_amount, char *purchase_req, char *comments, char *deleted_index, char *ignored_index, char *modified_index, char *added_index) |
USER_EXITS_API int | USER_is_allocation_complete (tag_t allocation_tag, tag_t allocation_window_tag, logical *is_complete) |
USER_EXITS_API int | USER_is_allocation_configured (tag_t rev_rule, logical *is_configured) |
USER_EXITS_API int | USER_is_allocation_correct (tag_t allocation_tag, tag_t allocation_window_tag, logical *is_correct) |
USER_EXITS_API int | USER_is_dataset_exportable (tag_t dataset_tag, int n_target_sites, tag_t *target_sites, logical is_transferring_ownership, logical modified_objects_only, logical *isExportable) |
USER_EXITS_API int | USER_is_item_rev_mature (tag_t item_rev_tag, logical *mature) |
USER_EXITS_API int | USER_item_create_cancelled (const char *item_id, const char *revision_id) |
USER_EXITS_API int | USER_item_created (const char *item_id, const char *revision_id) |
USER_EXITS_API int | USER_make_design_rev_primary_precond (tag_t part_rev, tag_t design_rev, logical *isDesignRevEligible) |
USER_EXITS_API int | USER_markup_pre_action_handler (METHOD_message_t *msg, va_list args) |
USER_EXITS_API int | USER_new_allocation_name (tag_t allocation_map_rev, tag_t alloc_type, char **new_allocation_name) |
USER_EXITS_API int | USER_new_alt_id (tag_t idcontext_tag, const char *preferred_pattern, tag_t altid_type_tag, tag_t parent_altid_tag, char **new_id) |
USER_EXITS_API void | USER_nx_shell_init_module (void) |
USER_EXITS_API int | USER_ods_client_ask_extra_attributes (int *n_attrs, char ***pr_pom_attr_names, char ***attr_options) |
USER_EXITS_API int | USER_ods_client_publish_extra_attributes (tag_t object_to_publish, int n_attrs, char **pr_pom_attr_names, char *attr_values[]) |
USER_EXITS_API int | USER_preinit_module (void) |
USER_EXITS_API int | USER_process_keyword_search_results (const char *name, FILE *f_ptr, int *num_found, tag_t **results) |
USER_EXITS_API int | USER_query_execute (const char *name, int num_args, char **keys, char **values, int *n_columns, char ***col_names, QRY_user_query_row_t **rows) |
USER_EXITS_API int | USER_query_free_rows (QRY_user_query_row_t *rows, int n_columns) |
USER_EXITS_API int | USER_query_map_row (const char *query_name, const QRY_user_query_row_t *row, tag_t *tag) |
USER_EXITS_API int | USER_register_aiws_extensions () |
USER_EXITS_API void | USER_register_bomline_attrs (char *attr_class) |
USER_EXITS_API int | USER_register_plmxml_actions () |
USER_EXITS_API int | USER_register_plmxml_export_methods () |
USER_EXITS_API int | USER_register_plmxml_filters () |
USER_EXITS_API int | USER_register_plmxml_import_methods () |
USER_EXITS_API int | USER_register_plmxml_schema_mappings () |
USER_EXITS_API int | USER_register_properties (void) |
USER_EXITS_API int | USER_register_tcplmxml_actions () |
USER_EXITS_API int | USER_register_tcplmxml_filters () |
USER_EXITS_API int | USER_string_compare (const char *s1, const char *s2) |
USER_EXITS_API void * | user_StringLtoRCreate (char *text) |
USER_EXITS_API int | USER_synchronize_baseline (const char *fullFilePathName) |
USER_EXITS_API int | USER_validate_alt_id (tag_t idcontext_tag, const char *idfr_type, const char *new_id, const char *pattern_name, char **modified_id, IDValid_e *status) |
USER_EXITS_API int | USER_validate_alternate (tag_t idcontext_tag, tag_t identifiable_tag, tag_t altid_type, tag_t altid_tag, logical *is_valid) |
USER_EXITS_API int | USER_validate_dataset_name (tag_t old_owner, tag_t old_dataset, const char *new_item_id, const char *new_revision_id, const char *item_type, const char *dataset_name, logical *valid) |
USER_EXITS_API int | USER_validate_id (char *boType, int nKey, char **keys, char **values, logical *isValid) |
USER_EXITS_API int | USER_where_used (char *bo_type, tag_t bo_tag, tag_t revision_rule, int *num_parents, tag_t **parents, int **levels) |
User Exits for File Names | |
USER_EXITS_API char * | USER_new_file_name (const char *dataset, const char *ref, const char *ext, const int rev) |
USER_EXITS_API int | PEC_Log_Handler (const TcSubscriptionActionMsg_t *subscription_action_msg, int nnum_handler_args, char **handler_args, va_list other_args) |
USER_EXITS_API char * | USER_rev_file_name (const char *old_file_name) |
User Exits for Archive and Restore | |
USER_EXITS_API char * | USER_default_archive_filename (void) |
USER_EXITS_API char * | USER_default_archive_tape_label (void) |
Part number generation routines | |
USER_EXITS_API int | USER_create_id_counter (char *counter) |
USER_EXITS_API void | USER_define_tc_next_id (void) |
USER_EXITS_API void | USER_create_instance_item_next_id (void) |
User Exits for Items and Item Revisions | |
USER_EXITS_API int | USER_new_item_id (tag_t old_item, tag_t item_type, logical *mod, char **item_id) |
USER_EXITS_API int | USER_new_item_ids (tag_t item_type, int quantity, logical *mod, char ***item_ids) |
USER_EXITS_API int | USER_new_revision_id (tag_t item_tag, tag_t item_type, logical *mod, char **revision_id) |
USER_EXITS_API int | USER_new_revision_id_from_alt_rule (char *rule_suffix, tag_t item_tag, tag_t item_type, logical *mod, char **id) |
USER_EXITS_API int | USER_validate_item_rev_id (const char *item_id, const char *rev_id, const char *item_type, char **modified_item_id, char **modified_rev_id, IDValid_e *status) |
USER_EXITS_API int | USER_validate_item_rev_id_2 (const char *item_id, const char *rev_id, const char *item_type, char **modified_item_id, char **modified_rev_id, IDValid_e *status_item_id, IDValid_e *status_rev_id) |
USER_EXITS_API int | USER_validate_item_rev_id_3 (const char *item_id, const char *rev_id, const tag_t item_tag, const char *item_type, char **modified_item_id, char **modified_rev_id, IDValid_e *status_item_id, IDValid_e *status_rev_id) |
User Exits for Non Master Handling During Save As | |
USER_EXITS_API int | USER_new_dataset_name (tag_t owner, tag_t dataset_type, tag_t relation_type, const char *basis_name, char **dataset_name, logical *modifiable) |
User Exits for UIF | |
USER_EXITS_API int | USER_new_current_group (tag_t group_tag, tag_t role_tag) |
Item creation & copy | |
USER_EXITS_API int | USER_copy_revision (const char *rev_id, tag_t source_rev) |
USER_EXITS_API int | USER_create_revision (tag_t item_tag, const char *rev_id) |
USER_EXITS_API int | USER_create_item (const char *item_id, const char *name, const char *type, const char *rev_id) |
User Exits for BOM Compare | |
USER_EXITS_API int | USER_bom_cmp_start_report (tag_t line1, tag_t line2, int mode, int output) |
USER_EXITS_API int | USER_bom_cmp_enter_report (tag_t line1, tag_t line2, int mode, int output) |
USER_EXITS_API int | USER_bom_cmp_item_report (tag_t cmp_item, int depth) |
USER_EXITS_API int | USER_bom_cmp_parent_report (tag_t bom_line, int depth) |
USER_EXITS_API int | USER_bom_cmp_exit_report () |
USER_EXITS_API int | USER_bom_cmp_end_report (logical changes) |
USER_EXITS_API int | USER_define_compare_descs () |
USER_EXITS_API int | USER_define_bom_compare_modes () |
User Exits for BOMViews and BOMView Revisions | |
USER_EXITS_API int | USER_ps_default_bom_view_name (tag_t item, tag_t view_type, char **name) |
USER_EXITS_API int | USER_ps_default_bvr_name (tag_t item_rev, tag_t view_type, char **name) |
User Exits for Appearances | |
USER_EXITS_API int | USER_ps_update_appr_attr (tag_t appr, tag_t parent, tag_t occ, tag_t mapping) |
USER_EXITS_API int | USER_appr_update_end_item_search_results (tag_t configuration_rule, int num_input_search_results, tag_t *input_search_results, int *num_output_search_results, tag_t **output_search_results) |
User Exits for Dataset | |
USER_EXITS_API int | USER_new_dataset_id (const tag_t item, const char *ds_type, logical *is_modifiable, char **id) |
USER_EXITS_API int | USER_new_dataset_rev (const char *ds_id, const char *ds_type, logical *is_modifiable, char **rev_id) |
User Exits for Folders and Forms | |
The User Exits feature controls the names of folders and forms during a Revise operation. | |
USER_EXITS_API int | USER_new_folder_name (tag_t parent_tag, char *parent_type, char *parent_name, char *basis_name, char *folder_type, logical *mod, char **new_name) |
USER_EXITS_API int | USER_new_form_name (tag_t parent_tag, char *parent_type, char *parent_name, char *basis_name, char *form_type, logical *mod, char **new_name) |
User exits for Global Teamcenter | |
USER_EXITS_API int | USER_ods_check_pubrec_access (tag_t pubrec_tag, const char *user_id, const char *group_name, const char *role_name, int client_site_id, logical *has_read_access) |
USER_EXITS_API int | USER_ods_publish_object (int ods_site_id, tag_t object_tag) |
USER_EXITS_API int | USER_idsm_start_remote_export (tag_t main_object_tag, int is_transferring_ownership, int ie_options, int remote_site_id, const char *remote_user_id, const char *remote_group_name, const char *remote_role_name) |
USER_EXITS_API int | USER_idsm_end_remote_import (tag_t main_object_tag, int is_transferring_ownership, const char *export_directory) |
USER_EXITS_API int | USER_end_local_import (tag_t main_object_tag, logical is_transferring_ownership, const char *export_directory) |
USER_EXITS_API int | USER_end_import_of_item (tag_t item_tag) |
User Exits for CM | |
USER_EXITS_API int | USER_ecm_get_prev_bvr (tag_t ec_rev_tag, tag_t bvr_tag, tag_t *prev_bvr_tag) |
USER_EXITS_API int | USER_ecm_define_never_used_relations (tag_t ec_rev_tag, tag_t parent_ir_tag, tag_t aff_bvr_tag, tag_t pro_bvr_tag) |
USER_EXITS_API int | USER_ecm_get_base_revision_rules (tag_t ec_rev_tag, tag_t affected_bvr_tag, tag_t problem_bvr_tag, logical *is_set, tag_t *affected_rule_tag, tag_t *problem_rule_tag) |
USER_EXITS_API int | USER_cm_get_base_revision_rules (tag_t cm_rev_tag, tag_t solution_bvr_tag, tag_t impacted_bvr_tag, logical *is_set, tag_t *solution_rule_tag, tag_t *impacted_rule_tag) |
USER_EXITS_API int | USER_ecm_get_process_name (tag_t change_rev_tag, int n_targets, tag_t *targets, char **process_name) |
Report Writer user_exits | |
USER_EXITS_API int | USER_register_report_columns (void) |
USER_EXITS_API logical | USER_report_include_row (tag_t pff_tag, int n_tags, tag_t *obj_tags) |
Validation object user_exits | |
USER_EXITS_API int | USER_evaluate_compound_result (char *validation_name, int validation_status, logical *validation_result) |
USER_EXITS_API int | USER_validation_post_action (tag_t target, logical validation_result, int validation_status) |
USER_EXITS_API int | TCHANDLER_proxy_link (void *subMsg, int nRecipients, char **recipientList) |
CAE Batch Meshing user_exits | |
USER_EXITS_API int | USER_get_batch_meshing_nr_name (const char *meshFileName, const char *meshSize, const char *meshFileExt, char namedRefName[IMF_filename_size_c+1]) |
USER_EXITS_API int | USER_get_batch_meshing_nr_name2 (const char *meshFileName, const char *meshSize, const char *meshFileExt, char **namedRefName) |
Teamcenter provides user exits to allow you to customize the Teamcenter applications to best fit your business needs. For example, user exits provide a means to customize Teamcenter for the way you generate your Item identifiers.
You can replace the Teamcenter provided user exits by using the C routines in this section.
User Exits on UNIX
In $TC_ROOT/sample, use the link_user_exits script to build a new shareable library. The source files used to build the user_exits shared library must be compiled with -pic or -PIC.
The link_user_exits script requires that all of the user exit object files reside in the current directory. They can be extracted from the user_exits library with the command:
ar x $TC_LIBRARY/libuser_exits.a
You can then replace any of the User exit modules by making the appropriate changes in template user exit functions. See the sample directory for the template files. These files contain the default behavior that comes with Teamcenter.
Make a backup copy of the original shareable library (libuser_exits.so.1.1 for SUN and libuser_exits.sl for the HP). Once you've created a back up copy of the original shareable library, copy the new shareable library back to the $TC_LIBRARY.
User Exits on Windows NT
This example uses User Defined Attributes (UDA) user exits as an example.
Create a sub-directory for the user exit library in your HOME directory.
mkdir %HOME%/userexit
Set your TC_USER_LIB environment variable.
set TC_USER_LIB=%HOME%/userexit
Copy the original user exit library to your directory.
copy %TC_ROOT%/dll/user_exits.a %HOME%/userexit/.
Extract objects from the library in your userexit directory. (If your MSDEV_HOME is not set, set it before running the extract script).
%TC_ROOT%/sample/extract_objects user_exits.a
There is sample UDA code that uses USER_exit_module and USER_register_properties in %TC_ROOT%/sample/properties/smp_props.c. This sample code shows you how to customize Teamcenter properties.
Copy this file to your userexit directory (or you can create your own).
copy %TC_ROOT%/sample/properties/smp_props.c
Compile this (or your) C program.
%TC_ROOT%/sample/compile smp_props.c
Once the smp_props.o (or your) object is created, remove the original user_init.o from your userexit directory since your new object also contains the user exit ITK calls. Then build the new library. As a result of the following call, libuser_exits.dll is created.
%TC_ROOT%/sample/link_user_exits
Start Teamcenter.
You should see your customizations.
#define USER_DATASET_always_copy 0 |
Definition at line 156 of file user_exits.h.
#define USER_DATASET_never_copy 1 |
Definition at line 157 of file user_exits.h.
#define USER_DATASET_user_chooses 2 |
Definition at line 158 of file user_exits.h.
#define USER_EXIT (EMH_UE_error_base + 1) |
Definition at line 109 of file user_exits.h.
typedef enum IDClass_e_obsolete IDClass_e |
Enumerated types to define the class of id to be defined by the user exit functions USER_ask_for_new_item and USER_ask_for_new_version_id
typedef enum IDFunc_e_obsolete IDFunc_e |
Indicates whether the requested number is for a copy (saveAs), a create, or a freeze action in the workspace.
Returned by USER_validate_item_rev_id() to describe the status of the item_rev ID passed to it.
Definition at line 122 of file user_exits.h.
typedef enum IVFType * IVFType_ep |
Definition at line 122 of file user_exits.h.
typedef struct USER_DATASET_details_s* USER_DATASET_details_p_t |
Definition at line 177 of file user_exits.h.
typedef struct USER_DATASET_details_s USER_DATASET_details_t |
typedef struct USER_prop_init_entry_s USER_prop_init_entry_t |
Improve user property registration. Used in user_props.c
enum IDClass_e_obsolete |
Enumerated types to define the class of id to be defined by the user exit functions USER_ask_for_new_item and USER_ask_for_new_version_id
Enumerator | |
---|---|
ID_BAD_CLASS | |
ID_WORKING | |
ID_OFFICIAL |
Definition at line 128 of file user_exits.h.
enum IDFunc_e_obsolete |
Indicates whether the requested number is for a copy (saveAs), a create, or a freeze action in the workspace.
Enumerator | |
---|---|
ID_BAD_FUNC | |
ID_SAVEAS | |
ID_CREATE | |
ID_FREEZE |
Definition at line 138 of file user_exits.h.
enum IDValid_t |
Returned by USER_validate_item_rev_id() to describe the status of the item_rev ID passed to it.
Enumerator | |
---|---|
USER_valid_id | |
USER_invalid_id | |
USER_modified_id | |
USER_override_id | |
USER_duplicate_id |
Definition at line 148 of file user_exits.h.
enum IVFType |
The following type is defined here for compatability with V2.x code; IVFType is an obsolete concept and its value will be ignored when passed to v3.x USER functions.
Enumerator | |
---|---|
IVF_BAD_TYPE | |
IVF_PRODUCT | |
IVF_STRUCTURE_GROUP | |
IVF_COMPONENT |
Definition at line 115 of file user_exits.h.
USER_EXITS_API void NOTE_ask_extension | ( | char * | file_name, |
char * | extension | ||
) |
USER_EXITS_API int PEC_Log_Handler | ( | const TcSubscriptionActionMsg_t * | subscription_action_msg, |
int | nnum_handler_args, | ||
char ** | handler_args, | ||
va_list | other_args | ||
) |
Log Handler for audit manager
USER_EXITS_API int TCHANDLER_proxy_link | ( | void * | subMsg, |
int | nRecipients, | ||
char ** | recipientList | ||
) |
USER_EXITS_API int USER_add_canned_methods | ( | void | ) |
This USER EXIT will be used to add site based canned methods. If a site wants to add custom methods as canned methods so as to make these canned methods available for configuration from the Business Rules Application, then the function to add canned methods need to be called from within this USER EXIT. The function to add the canned methods is METHOD_CM_add_method().
USER_EXITS_API int USER_appr_item_is_above_ERCT | ( | tag_t | appr_context, |
tag_t | item_tag, | ||
logical * | is_above_erct | ||
) |
Used by the Appearance (APPR) module, for appearance sets that are configured by a mixture of unit effectivity and release date. Such structures are considered to contain a (ragged) line running across this structure, called the Effectivity-Release Configuration Transition (ERCT). Above this line items are configured by unit effectivity; below it they are configured by date. Whether a given item lies above or below the line is deemed to be a property of the item, and possibly of the particular appearance set (context), however the specific decision is a matter for the customer's business process, hence this function is provided as a user exit for the user to implement. The default behavior for this exit as supplied with base Teamcenter is to always return true, so that all items will be treated as 'above ERCT' and configured by unit effectivity.
appr_context | (I) |
item_tag | (I) |
is_above_erct | (O) |
USER_EXITS_API int USER_appr_update_end_item_search_results | ( | tag_t | configuration_rule, |
int | num_input_search_results, | ||
tag_t * | input_search_results, | ||
int * | num_output_search_results, | ||
tag_t ** | output_search_results | ||
) |
Appearance end-item search results update user exit
configuration_rule | (I) |
num_input_search_results | (I) |
input_search_results | (I) |
num_output_search_results | (O) |
output_search_results | (O) |
We invented a new property for an item called "configured_revisions", and this method will be called while invoking this property method call. So, users may customize this method to get their interested revisions, otherwise it returns null tag.
item_tag | (I) |
count | (O) |
revisions | (OF) count |
USER_EXITS_API char* USER_ask_for_new_sequence_no | ( | tag_t | parent_bom_revision | ) |
Allocate a sequence number for a prospective occurrence
parent_bom_revision | (I) |
USER_EXITS_API int USER_ask_new_default_sequence_number | ( | tag_t | parent_bom_rev, |
tag_t | item, | ||
char ** | sequence_number | ||
) |
Obtains a find number to be used for a new occurrence of Item as specified in the parent_bom_rev
parameter.
This function provides the default implementation for USER_ask_new_seqno This method provides a default behaviour in case of customer written user_exit/BMF overrides are not able to generate sequence number.
This function will not replace the existing USER_ask_new_seqno
The functionality behavior is as follows:
parent_bom_rev
parameter is incorrect. item
parameter is incorrect. parent_bom_rev | (I) Tag of the parent BOM Revision |
item | (I) Tag of the Item or ItemRevision |
sequence_number | (OF) The sequence number |
Returns a find number as a string in SM space, to be used for a new occurrence of item in parent_bom_rev. This function is called:
The find number returned depends on the PS_new_seqno_mode preference which can take one of three values:
new | Each item added to the BOM revision is allocated a new number. This is the default action. |
existing | If the item to be added already exists in the BOM, then the existing find number for that item is returned. |
none | No number (i.e., an empty string) is returned allowing the user to add numbers in later. |
This function replaces USER_ask_for_new_sequence_no. For the case of new the old function is called to provide the find number. In the case of existing if the item does not already exist in the BOM revision then the old function is called again. It is also called if item is NULLTAG.
Any programs that call the old function will still work and the old user exit is still called, but programmers should update any code that uses or overrides USER_ask_for_new_sequence_no to the new function so as to take account of the new preference.
In the case of none, an empty string is always returned.
The default functionality provided behaves as follows. The function returns the next multiple of ten above the largest current find number provided all the find numbers in the parent have numeric values. If no find numbers have yet been created, it returns 10. If there are non-numeric find numbers then these are ignored. Find numbers need not be unique.
parent_bom_rev | (I) |
item | (I) Tag of the item or item revision being pasted |
seqn_number | (OF) |
USER_EXITS_API int USER_ask_seq_numbers | ( | tag_t | parent_bvr, |
int | count, | ||
tag_t * | child, | ||
char *** | seq_numbers | ||
) |
This new version is written specifically for CLONING
parent_bvr | (I) |
count | (I) |
child | (I) |
seq_numbers | (OF) count |
USER_EXITS_API int USER_baseline_dryrun_validator | ( | const char * | baseRevListFullFileName | ) |
baseRevListFullFileName | (I) |
USER_EXITS_API int USER_bom_cmp_end_report | ( | logical | changes | ) |
This user exit is called by the PSE driven compare and (optionally) the ITK compare function. It is called at the end of a compare, even if no differences exist.
This user exit allows some tidying up and footer output to be performed.
changes | (I) Set to true if changes exist, otherwise false |
This user exit is called by the PSE driven compare and (optionally) the ITK compare function. It is called at the start of a compare, only if differences exist. This function is called after USER_bom_cmp_start_report.
This user exit allows some report initialization and header output to be performed.
line1 | (I) Tag of the first BOM line being compared |
line2 | (I) Tag of the second BOM line being compared |
mode | (I) Compare mode being used. May be one of the following: BOM_compare_singlelevel BOM_compare_lowestlevel BOM_compare_multilevel |
output | (I) Output mechanism being used. Constructed by adding the following values as required: BOM_compare_output_bomline BOM_compare_output_userexit BOM_compare_output_report |
USER_EXITS_API int USER_bom_cmp_exit_report | ( | ) |
This user exit is called by the PSE driven compare and (optionally) the ITK compare function. It is called at the end of a compare, only if differences exist. This function is called before USER_bom_cmp_end_report.
This user exit allows some tidying up and footer output to be performed.
USER_EXITS_API int USER_bom_cmp_item_report | ( | tag_t | cmp_item, |
int | depth | ||
) |
This user exit is called by the PSE driven compare and (optionally) the ITK compare function. It is called once for every different item which the BOM compare finds.
This user exit allows details of a single item which has changed to be output to a report. The BOM compare ITK functions can be used to extract information about the exact nature of the changes.
cmp_item | (I) Tag of a compare item |
depth | (I) Depth of the compare item below the item selected to be compared. This is only relevant in multi-level compares. |
USER_EXITS_API int USER_bom_cmp_parent_report | ( | tag_t | bom_line, |
int | depth | ||
) |
This user exit is called by the PSE driven compare and (optionally) the ITK compare function. It is only called in multi-level mode. It is called once for every BOM line which is an ancestor of a changed item.
This user exit allows details of a changed item's ancestry to be output to a report. This function and USER_bom_cmp_item_report are called in the correct order to allow a report to be output as an indented bill.
bom_line | (I) Tag of the parent BOM line |
depth | (I) Depth of the BOM line below the item selected to be compared |
This user exit is called by the PSE driven compare and (optionally) the ITK compare function. It is called at the start of a compare, even if no differences exist.
This user exit allows some report initialization and header output to be performed. In the supplied compare user exit code it is used to suppress the calling of the other user exit functions.
line1 | (I) Tag of the first BOM line being compared |
line2 | (I) Tag of the second BOM line being compared |
mode | (I) Compare mode being used. May be one of the following: BOM_compare_singlelevel BOM_compare_lowestlevel BOM_compare_multilevel |
output | (I) Output mechanism being used. Constructed by adding the following values as required: BOM_compare_output_bomline BOM_compare_output_userexit BOM_compare_output_report |
USER_EXITS_API int USER_bomline_is_preferred_ancestor | ( | tag_t | bomline_or_appearance, |
logical | is_bomline, | ||
logical * | is_preferred_ancestor | ||
) |
BOMLine preferred ancestor user exit
bomline_or_appearance | (I) |
is_bomline | (I) |
is_preferred_ancestor | (O) |
USER_EXITS_API int USER_build_notify_message | ( | const TcSubscriptionActionMsg_t * | theSubscriptionMsg, |
char ** | messageSubject, | ||
int * | nMessageLines, | ||
char *** | messageLines | ||
) |
User exits for the notification handler. Used in notifyhandler.cxx
theSubscriptionMsg | (I) |
messageSubject | (O) |
nMessageLines | (O) |
messageLines | (O) |
USER_EXITS_API int USER_build_notify_message_with_locale | ( | const TcSubscriptionActionMsg_t * | theSubscriptionMsg, |
const char * | localeStr, | ||
char ** | messageSubject, | ||
int * | nMessageLines, | ||
char *** | messageLines | ||
) |
User exits for the notification handler. Used in notifyhandler.cxx
theSubscriptionMsg | (I) |
localeStr | (I) |
messageSubject | (O) |
nMessageLines | (O) |
messageLines | (O) |
USER_EXITS_API int USER_classification_autocompute_attr | ( | ) |
USER_EXITS_API int USER_cm_get_base_revision_rules | ( | tag_t | cm_rev_tag, |
tag_t | solution_bvr_tag, | ||
tag_t | impacted_bvr_tag, | ||
logical * | is_set, | ||
tag_t * | solution_rule_tag, | ||
tag_t * | impacted_rule_tag | ||
) |
User exit to allow custom code to set dynamic revision rules for the solution and the impacted assemblies. Using this method, the user can supply the revision rules to be used while saving BOM change objects and also while displaying PSE Supersedure window in i-man Portal. By default core CM revision logic will be applied.
USER_EXITS_API int USER_compute_effectivity | ( | tag_t | blTag, |
logical | intersectConfigEff, | ||
logical * | occEffExists, | ||
logical * | isConfigured, | ||
int * | effyCount, | ||
WSOM_effectivity_info_t *** | effectivityInfo | ||
) |
blTag | (I) BOMLine tag |
intersectConfigEff | (I) If true Occ Effectivity(netEffObjTags) is intersection of BOMLine Eff with Effectivity on BOMWindow Configuration |
occEffExists | (O) true if the occurrence has effectivity defined. |
isConfigured | (O) true if the occurrence is configured. |
effyCount | (O) Occurrence Effectivity count |
effectivityInfo | (OF) Occurrence Effectivity |
USER_EXITS_API int USER_copied_dataset_name | ( | tag_t | old_owner, |
tag_t | old_dataset, | ||
tag_t | relation_type, | ||
tag_t | new_owner, | ||
char ** | dataset_name, | ||
logical * | modifiable | ||
) |
Generates a name for a dataset when it is copied. This user exit is called when the Dataset Save As dialog box appears.
This function is required to use whatever inputs it is given to generate a sensible name for the copied dataset.
Original Default Implementation
If the old dataset tag is given, set the new name to be equal to that of the original dataset. If it has not been given, and the new revision has, then set the name to be the new revision id string. If neither the old dataset nor the new revision tag is given, then set the name to be a null pointer. In all cases, return modifiable = true.
New Default Implementation
Assuming all the tags are given, this function should match the original name onto the pattern SP1 and return the new dataset name with the replacements made for item and revision ids. If either the old revision tag, the old dataset tag, or the new revision tag are missing, then we cannot perform the match onto the pattern. In this case, we should maintain the original behaviour. Return modifiable = SP2 (allow_name_modification). The new implementation preserves the original behavior with the default settings of the Teamcenter site preferences SP1 and SP2.
old_owner | (I) Tag of the old revision |
old_dataset | (I) Tag of the old dataset |
relation_type | (I) Tag of the relation type between parent and old dataset |
new_owner | (I) Tag of the new parent object, if this is known. Set to NULLTAG otherwise. |
dataset_name | (OF) Pointer to a string containing the generated dataset name |
modifiable | (O) A Boolean flag indicating whether the generated name may be overridden subsequently |
USER_EXITS_API int USER_copied_datasets_details | ( | tag_t | old_revision, |
const char * | new_item_id, | ||
const char * | new_revision_id, | ||
const char * | new_item_type, | ||
int | dataset_count, | ||
tag_t | dataset_list[], | ||
USER_DATASET_details_t ** | details, | ||
logical * | allow_duplicates | ||
) |
This function is used to determine how a set of datasets should be copied via a save-as operation.
Default Implementation
Generate the new names and whether or not the names can be modified by the user. Use SP4 (always/never_copy) which determines which types must always/never be copied to determine the copy state for each. Set the validation requirement based on SP3 (force_name_validation). Set the owner return values based on SP5 (owner). allow_duplicates is returned according to the site preference.
old_revision | (I) Tag of the old revision |
new_item_id | (I) ItemID for the new item (has not necessarily been created yet) |
new_revision_id | (I) RevisionID for the new revision (has not necessarily been created yet) |
new_item_type | (I) Item type for the new item (has not necessarily been created yet) |
dataset_count | (I) Number of datasets in array |
dataset_list | (I) Array of tags of datasets to query |
details | (OF) Pointer to an array of "details" structures, described below. Each structure refers to one of the non-master names. |
allow_duplicates | (O) Whether or not duplicate non-master names should be allowed |
USER_EXITS_API int USER_copy_revision | ( | const char * | rev_id, |
tag_t | source_rev | ||
) |
Called before we do the action; returning non-zero ifail will abort the operation
rev_id | (I) |
source_rev | (I) |
USER_EXITS_API int USER_create_id_counter | ( | char * | counter | ) |
counter | (I) |
USER_EXITS_API void USER_create_instance_item_next_id | ( | void | ) |
USER_EXITS_API int USER_create_item | ( | const char * | item_id, |
const char * | name, | ||
const char * | type, | ||
const char * | rev_id | ||
) |
item_id | (I) |
name | (I) |
type | (I) |
rev_id | (I) |
USER_EXITS_API int USER_create_revision | ( | tag_t | item_tag, |
const char * | rev_id | ||
) |
item_tag | (I) |
rev_id | (I) |
USER_EXITS_API char* USER_default_archive_filename | ( | void | ) |
Method to generate a default filename for the archive metafile. The format of the filename is:
archive_<date><time>
Where <date> is an eight-character date stamp in year/month/date format and <time> is a six-character time stamp in hours/minutes/seconds format.
USER_EXITS_API char* USER_default_archive_tape_label | ( | void | ) |
Method to generate a default tape label for tape archive media. The format of the tape label is:
AR<date><time>
Where <date> is an eight-character date stamp in year/month/date format and <time> is a six-character time stamp in hours/minutes/seconds format.
USER_EXITS_API int USER_define_bom_compare_modes | ( | ) |
Called by BOM Compare immediately after it has defined all the standard internal BOM compare modes. This is the user exit in which users should define their own modes, or adjust the standard ones.
USER_EXITS_API int USER_define_compare_descs | ( | ) |
Called by Generic Compare Engine immediately after it has defined all the standard internal compare descriptors. This is the user exit in which users should define their own descriptors, or adjust the standard ones.
USER_EXITS_API void USER_define_tc_next_id | ( | void | ) |
USER_EXITS_API int USER_ecm_define_never_used_relations | ( | tag_t | ec_rev_tag, |
tag_t | parent_ir_tag, | ||
tag_t | aff_bvr_tag, | ||
tag_t | pro_bvr_tag | ||
) |
User exit to allow custom code to create never used relation between the end item and a part, which has a BOM Change associated with it, in the assembly. "ECM_never_used" is used as the relation name. This relation is used to determine the never used parts in a genealogy trail.
ec_rev_tag | (I) Tag of the Change Revision |
parent_ir_tag | (I) Tag of the Problem Item Revision |
aff_bvr_tag | (I) Tag of the Affected Bom View Revision |
pro_bvr_tag | (I) Tag of the Problem Bom View Revision |
USER_EXITS_API int USER_ecm_get_base_revision_rules | ( | tag_t | ec_rev_tag, |
tag_t | affected_bvr_tag, | ||
tag_t | problem_bvr_tag, | ||
logical * | is_set, | ||
tag_t * | affected_rule_tag, | ||
tag_t * | problem_rule_tag | ||
) |
User exit to allow custom code to set dynamic revision rules for the affected and the problem assemblies. Using this method, the user can supply the revision rules to be used while saving BOM change objects and also while displaying PSE Supersedure window in i-man Portal. By default core CM revision logic will be applied.
ec_rev_tag | (I) Tag of the Change Revision |
affected_bvr_tag | (I) Tag of the Affected Bom View Revision |
problem_bvr_tag | (I) Tag of the Problem Bom View Revision |
is_set | (O) Indicates whether the Revision Rules have been set |
affected_rule_tag | (O) Tag of the Revision Rule for the Affected assembly |
problem_rule_tag | (O) Tag of the Revision Rule for the Problem assembly |
User exit to allow custom code to change the affected Item to Problem Item relationship from default that has been supplied by i-man. Default relation name is the Problem pseudo-folder name that is mentioned in the site preference ECM_prev_structure_relation. This relation is created when the creator of the EC revision pastes the problem Item Revisions in that folder.
ec_rev_tag | (I) Tag of the Change Revision |
bvr_tag | (I) Tag of the Affected Bom View Revision |
prev_bvr_tag | (O) Tag of the Problem Bom View Revision |
USER_EXITS_API int USER_ecm_get_process_name | ( | tag_t | change_rev_tag, |
int | n_targets, | ||
tag_t * | targets, | ||
char ** | process_name | ||
) |
User exit to allow custom code to get process name for multiple processes. Using this function the user can generate a process name based on the targets that have been provided as input. This process name is used when multiple processes are to be initiated for the targets from the multiple processes dialog.
change_rev_tag | (I) Tag of the Change Revision |
n_targets | (I) Number of targets of the EPM process |
targets | (I) Tags of the targets of the EPM process |
process_name | (OF) Name of the EPM Process |
USER_EXITS_API int USER_end_import_of_item | ( | tag_t | item_tag | ) |
item_tag | (I) |
USER_EXITS_API int USER_end_local_import | ( | tag_t | main_object_tag, |
logical | is_transferring_ownership, | ||
const char * | export_directory | ||
) |
This user exit USER_end_local_import runs when a replication is performed at the importing site. It enables a site to perform custom actions, for example, when an Item Revision is being replicated into the database. (For example: perform validations on certain attributes, release status, etc).
main_object_tag | (I) |
is_transferring_ownership | (I) |
export_directory | (I) |
USER_EXITS_API int USER_evaluate_compound_result | ( | char * | validation_name, |
int | validation_status, | ||
logical * | validation_result | ||
) |
validation_name | (I) |
validation_status | (I) |
validation_result | (O) |
USER_EXITS_API int USER_execute_saved_query | ( | const char * | name, |
int | num_args, | ||
char ** | keys, | ||
char ** | values, | ||
int * | num_found, | ||
tag_t ** | found | ||
) |
Allows a custom-programmer to replace the query mechanism while keeping the display mechanism.
This means the query must return displayable TC objects, but can run arbitrary code and hence do queries too complicated to express in SQL. (see TC_ROOT/sample/examples/user_query.c)
It is required to execute "TC_ROOT/bin/tc_set_query_where_run" with argument value "-run=query"
name | (I) The name of the saved query |
num_args | (I) The number of arguments |
keys | (I) The keys of the arguments |
values | (I) The values of the arguments |
num_found | (O) The number of found result |
found | (OF) num_found The result found |
USER_EXITS_API int USER_exit_module | ( | void | ) |
USER_EXITS_API int USER_get_batch_meshing_nr_name | ( | const char * | meshFileName, |
const char * | meshSize, | ||
const char * | meshFileExt, | ||
char | namedRefName[IMF_filename_size_c+1] | ||
) |
meshFileName | (I) file name into which to encode mesh size |
meshSize | (I) mesh size to encode |
meshFileExt | (I) file name extension |
namedRefName | (O) resulting named ref name |
USER_EXITS_API int USER_get_batch_meshing_nr_name2 | ( | const char * | meshFileName, |
const char * | meshSize, | ||
const char * | meshFileExt, | ||
char ** | namedRefName | ||
) |
meshFileName | (I) file name into which to encode mesh size |
meshSize | (I) mesh size to encode |
meshFileExt | (I) file name extension |
namedRefName | (OF) resulting named ref name |
USER_EXITS_API int USER_get_keyword_search_client | ( | const char * | name, |
int | num_args, | ||
char ** | names, | ||
char ** | values, | ||
char ** | search_client | ||
) |
Full Text Keyword Search "PLUG-n-PLAY" feature.
name | (I) |
num_args | (I) |
names | (I) |
values | (I) |
search_client | (OF) search client |
USER_EXITS_API int USER_gs_shell_init_module | ( | void | ) |
Demonstrate how to encapsulate an application
USER_EXITS_API int USER_idsm_end_remote_import | ( | tag_t | main_object_tag, |
int | is_transferring_ownership, | ||
const char * | export_directory | ||
) |
main_object_tag | (I) |
is_transferring_ownership | (I) |
export_directory | (I) |
USER_EXITS_API int USER_idsm_start_remote_export | ( | tag_t | main_object_tag, |
int | is_transferring_ownership, | ||
int | ie_options, | ||
int | remote_site_id, | ||
const char * | remote_user_id, | ||
const char * | remote_group_name, | ||
const char * | remote_role_name | ||
) |
main_object_tag | (I) |
is_transferring_ownership | (I) |
ie_options | (I) |
remote_site_id | (I) |
remote_user_id | (I) |
remote_group_name | (I) |
remote_role_name | (I) |
USER_EXITS_API int USER_init_module | ( | void | ) |
USER_EXITS_API void USER_invoke_pdm_server | ( | int | input_code, |
char * | input_string, | ||
int * | output_code, | ||
char ** | output_string | ||
) |
Invoke pdm server
USER_EXITS_API int USER_invoke_user_code_string | ( | int | input_code, |
const char * | input_string, | ||
int * | output_code, | ||
char ** | output_string | ||
) |
Invoke user code from web
input_code | (I) |
input_string | (I) |
output_code | (O) |
output_string | (OF) |
USER_EXITS_API int USER_invoke_user_code_taglist | ( | int | input_code, |
const char * | input_string, | ||
tag_t | input_tag, | ||
tag_t * | output_tag, | ||
char ** | output_string, | ||
int * | output_count, | ||
tag_t ** | output_taglist | ||
) |
input_code | (I) |
input_string | (I) |
input_tag | (I) |
output_tag | (O) |
output_string | (OF) |
output_count | (O) |
output_taglist | (OF) output_count |
USER_EXITS_API int USER_invoke_user_create_objs | ( | tag_t | tag, |
char * | form_name, | ||
char * | num_of_cost_elem, | ||
const char * | plant, | ||
char * | currency, | ||
char * | lead_time, | ||
char * | supplier, | ||
char * | percentage, | ||
char * | titles, | ||
char * | element_vals, | ||
char * | ar_number, | ||
char * | sender_psp, | ||
char * | receiver_psp, | ||
char * | sap_index, | ||
char * | sap_date, | ||
char * | sap_amount, | ||
char * | purchase_req, | ||
char * | comments, | ||
char * | deleted_index, | ||
char * | ignored_index, | ||
char * | modified_index, | ||
char * | added_index | ||
) |
tag | (I) Tag |
form_name | (I) Form name |
num_of_cost_elem | (I) Number of Cost Elements |
plant | (I) Plant array |
currency | (I) Currency |
lead_time | (I) Lead Time |
supplier | (I) Supplier |
percentage | (I) Percentage |
titles | (I) Titles |
element_vals | (I) Elements vals |
ar_number | (I) ArNumbers |
sender_psp | (I) Sender PSP |
receiver_psp | (I) Receiver PSP |
sap_index | (I) Sap Index |
sap_date | (I) Sap Date |
sap_amount | (I) Sap amount |
purchase_req | (I) Purchase req |
comments | (I) Comments |
deleted_index | (I) Deleted Rows |
ignored_index | (I) Ignored Rows |
modified_index | (I) Modified Rows |
added_index | (I) Added Rows |
USER_EXITS_API int USER_is_allocation_complete | ( | tag_t | allocation_tag, |
tag_t | allocation_window_tag, | ||
logical * | is_complete | ||
) |
Defines what it means for an Allocation to be Complete
allocation_tag | (I) Tag that provides the allocation object |
allocation_window_tag | (I) Tag that provides the Allocation Window to which the allocation belongs to. This can be NULLTAG |
is_complete | (O) Return a boolean value - True or False |
Defines what it means for an Allocation to be Configured
rev_rule | (I) Tag that provides the Revision Rule |
is_configured | (O) Return a boolean value -True or False |
USER_EXITS_API int USER_is_allocation_correct | ( | tag_t | allocation_tag, |
tag_t | allocation_window_tag, | ||
logical * | is_correct | ||
) |
Defines what it means an Allocation to be Correct
allocation_tag | (I) Tag that provides the allocation object |
allocation_window_tag | (I) Tag that provides the Allocation Window to which the allocation belongs to. This can be NULLTAG |
is_correct | (O) Return a boolean value - True or False |
USER_EXITS_API int USER_is_dataset_exportable | ( | tag_t | dataset_tag, |
int | n_target_sites, | ||
tag_t * | target_sites, | ||
logical | is_transferring_ownership, | ||
logical | modified_objects_only, | ||
logical * | isExportable | ||
) |
To check if dataset should be allowed to export based on it's classification type
dataset_tag | (I) tag of dataset object |
n_target_sites | (I) number of target sites |
target_sites | (I) target sites list |
is_transferring_ownership | (I) logical indicating if multisite transfer will transfer ownership |
modified_objects_only | (I) logical indicating if multisite transfer is transferring only modified objects or otherwise |
isExportable | (O) decision, if this dataset tag should be multisite exported or not |
This function is used to determine if the Item Revision is mature or not. By default, the status on the ItemRevision Object is compared to the value specified on the group level preference <ItemRevision Type Name>_Maturity_Level If the value in the preference matches to any of the status objects on the ItemRevision the TRUE is returned. If the preference doesnot exist then the default value to compare with against is 'Released'.
item_rev_tag | (I) |
mature | (O) |
USER_EXITS_API int USER_item_create_cancelled | ( | const char * | item_id, |
const char * | revision_id | ||
) |
This USER EXIT ITK provides a hook point for customers to plug the customization codes into the cancellation of item creation. It is called at the end of operation when the item creation is cancelled.
item_id | (I) Id of the item whose creation being cancelled |
revision_id | (I) Revision id of the item whose creation being cancelled |
USER_EXITS_API int USER_item_created | ( | const char * | item_id, |
const char * | revision_id | ||
) |
This USER EXIT ITK provides a hook point for customers to plug the customization codes into the item creation. It is called at the end of successful item creation.
item_id | (I) Id assigned to the newly created item |
revision_id | (I) Revision id assigned to the newly created item revision |
USER_EXITS_API int USER_make_design_rev_primary_precond | ( | tag_t | part_rev, |
tag_t | design_rev, | ||
logical * | isDesignRevEligible | ||
) |
part_rev | (I) |
design_rev | (I) |
isDesignRevEligible | (O) |
USER_EXITS_API int USER_markup_pre_action_handler | ( | METHOD_message_t * | msg, |
va_list | args | ||
) |
DMI register markup pre-action handler which is used to build a customize stack file for the markup tool.
USER_EXITS_API int USER_new_allocation_name | ( | tag_t | allocation_map_rev, |
tag_t | alloc_type, | ||
char ** | new_allocation_name | ||
) |
Generates an Allocation name for the user.
allocation_map_rev | (I) Tag that provides the allocation map revision context for the allocation |
alloc_type | (I) Tag that provides the type of the allocation for which the name is to be generated |
new_allocation_name | (OF) Pointer to the new allocation name |
USER_EXITS_API int USER_new_alt_id | ( | tag_t | idcontext_tag, |
const char * | preferred_pattern, | ||
tag_t | altid_type_tag, | ||
tag_t | parent_altid_tag, | ||
char ** | new_id | ||
) |
This function provides a hook point for customers, and gets called with following different parameters:
1. | Brand new item creation (assign button selected)
|
2. | From save function if it was not already assigned
|
3. | From revise alternate creation (assign button selected) idcontext_tag or NULLTAG altid_type = alt revision identifier type or NULLTAG parent_altid_tag = tag to alt identifier for item alternateid |
idcontext_tag | (I) Tag of IdContext |
preferred_pattern | (I) Pattern string |
altid_type_tag | (I) Tag of alt identifier type |
parent_altid_tag | (I) Tag of parent alt identifier type |
new_id | (OF) New Item alternate id |
User exit to allow custom code to be notified whenever the user changes group. For example, this might be used to show or hide buttons on the custom pull-down menu in Workspace, so that users have access to different custom dialog boxes depending on their role.
group_tag | (I) Tag of the user's new current group |
role_tag | (I) Tag of the user's new current role |
USER_EXITS_API int USER_new_dataset_id | ( | const tag_t | item, |
const char * | ds_type, | ||
logical * | is_modifiable, | ||
char ** | id | ||
) |
Generates new Dataset ID.
The default implementation provides the ID using the following steps:
ds_type
does not exist. item | (I) Tag of the Item or Item Revision that will own the newly created Dataset. This can be a NULLTAG if a new ID is generated by ID counter. If item is invalid, it will be ignored by the default implemenation. |
ds_type | (I) Name of the Dataset Type. |
is_modifiable | (O) Indicates if a modified version of retrieved Dataset ID can be used. |
id | (OF)The new Dataset ID. |
USER_EXITS_API int USER_new_dataset_name | ( | tag_t | owner, |
tag_t | dataset_type, | ||
tag_t | relation_type, | ||
const char * | basis_name, | ||
char ** | dataset_name, | ||
logical * | modifiable | ||
) |
Generates a name for a new dataset. This user exit is called when the Dataset Creation dialog box appears.
owner | (I) Tag that provides the Item/Item Revision for which the new dataset is to created. This parameter may be NULLTAG. In case of Direct Model dataset created from NX/Manager interface this will be the tag of dataset for which the Direct Model is being created. |
As an example, It would be the tag of the UGMASTER dataset if the DirectModel is created for it
dataset_type | (I) Tag that provides the type of the dataset. This parameter may be NULLTAG. |
relation_type | (I) Tag that provides the type of the relationship between the dataset and the Item/Item Revision. This parameter may be NULLTAG. |
basis_name | (I) Name that should provide the basis for the dataset name. For users of UG/Manager, the contents of the "File Name" text entry box on the "New Part" dialog is passed as basis_name . The value for basis_name is simply returned in the dataset name for this default implementation. For users of IMAN, basis_name is set to NULL. If basis_name is NULL, the dataset name will be the name of Item Revision which tag is provided in the owner parameter. |
dataset_name | (OF) Pointer should be set to point to the new name |
modifiable | (O) Should be set to true if the returned value must not be modified by the user |
USER_EXITS_API int USER_new_dataset_rev | ( | const char * | ds_id, |
const char * | ds_type, | ||
logical * | is_modifiable, | ||
char ** | rev_id | ||
) |
Generates new Dataset revision ID.
ds_id | (I) The Dataset ID. This can be a NULL. |
ds_type | (I) Name of the Dataset Type. |
is_modifiable | (O) Indicates if a modified version of retrieved Dataset revision ID can be used. |
rev_id | (OF) New dataset revision ID. |
USER_EXITS_API char* USER_new_file_name | ( | const char * | dataset, |
const char * | ref, | ||
const char * | ext, | ||
const int | rev | ||
) |
Method to generate a file name for a dataset.
The format of the name is: dname_refname_date.ext
The generated file name should be freed by calling free() rather than MEM_free().
dataset | (I) Dataset name |
ref | (I) Reference type name |
ext | (I) Extension of the file |
rev | (I) Revision number of the dataset |
USER_EXITS_API int USER_new_folder_name | ( | tag_t | parent_tag, |
char * | parent_type, | ||
char * | parent_name, | ||
char * | basis_name, | ||
char * | folder_type, | ||
logical * | mod, | ||
char ** | new_name | ||
) |
This program returns a new folder name based on the parent values or the basis name. the default action returns the basis_name as the new_name, and mod will be set to true. If the basis name is NULL then the following would be tried until a non-NULL value is found; the parent name, the folder type, or "Folder."
parent_tag | (I) Tag of the intended parent of this folder, use to validate or determine the new folder name. Can be a NULLTAG. |
parent_type | (I) Type of the intended parent of this folder, use to validate or determine the new folder name. Can be a NULL. |
parent_name | (I) Name of the intended parent of this folder, use to validate or determine the new folder name. Can be a NULL. |
basis_name | (I) Possible name for new folder. Can be NULL. |
folder_type | (I) Name of folder type. Can be NULL. |
mod | (O) Returns whether name field can be modified, default value is true |
new_name | (OF) The new folder name |
USER_EXITS_API int USER_new_form_name | ( | tag_t | parent_tag, |
char * | parent_type, | ||
char * | parent_name, | ||
char * | basis_name, | ||
char * | form_type, | ||
logical * | mod, | ||
char ** | new_name | ||
) |
Returns a new form name based on the form type and either the parent tag or the basis name. Default action is to return the basis_name as the new_name, and mod will be set to true. If the basis name is NULL then the following would be tried until a non-NULL value is found; the parent name, the form type, or "Form."
parent_tag | (I) Tag of the intended parent of this form, use to validate or determine the new form name. Can be a NULLTAG. |
parent_type | (I) Type of the intended parent of this form, use to validate or determine the new form name. Can be a NULL. |
parent_name | (I) Name of the intended parent of this form, use to validate or determine the new form name. Can be a NULL. |
basis_name | (I) Possible name for new form. Can be NULL. |
form_type | (I) Name of form type. Can be NULL. |
mod | (O) Returns whether name field can be modified, default value is true. |
new_name | (OF) The new form name |
USER_EXITS_API int USER_new_item_id | ( | tag_t | old_item, |
tag_t | item_type, | ||
logical * | mod, | ||
char ** | item_id | ||
) |
Generates an Item ID for a user.
old_item | (I) Tag that provides a seed value for Save As. May be a NULLTAG if a new number is requested. |
item_type | (I) Tag that provides the type of the Item for which the ID is to be generated |
mod | (O) Specifies if the output ID can be modified. If set to false , any attempt to use a modified output ID might lead to issues. |
item_id | (OF) Generated Item ID. |
USER_EXITS_API int USER_new_item_ids | ( | tag_t | item_type, |
int | quantity, | ||
logical * | mod, | ||
char *** | item_ids | ||
) |
Generate Item IDs in bulk for the specified Item type
item_type | (I) Tag that provides the type of the Item for which the IDs is to be generated |
quantity | (I) Number of Item IDs to be generated for the specified Item type. |
mod | (O) Specifies if any output ID can be modified. If set to false , any attempt to use a modified output ID might lead to issues. |
item_ids | (OF) quantity Generated Item IDs. This array is not packed, which means that both, the elements and the container need to be freed through a call to MEM_free. |
USER_EXITS_API int USER_new_revision_id | ( | tag_t | item_tag, |
tag_t | item_type, | ||
logical * | mod, | ||
char ** | revision_id | ||
) |
Generates an Item Revision ID for a user.
item_tag | (I) Tag that provides the Item for which a new revision ID is to generated. |
item_type | (I) Tag that provides the type of the Item for which the ID is to be generated. |
mod | (O) Specifies if the output ID can be modified. If set to false , any attempt to use a modified output ID might lead to issues. |
revision_id | (OF) Generated Item Revision ID. |
USER_EXITS_API int USER_new_revision_id_from_alt_rule | ( | char * | rule_suffix, |
tag_t | item_tag, | ||
tag_t | item_type, | ||
logical * | mod, | ||
char ** | id | ||
) |
Handles revision ids for preliminary data
rule_suffix | (I) |
item_tag | (I) |
item_type | (I) |
mod | (O) |
id | (OF) |
USER_EXITS_API void USER_nx_shell_init_module | ( | void | ) |
Demonstrate how to encapsulate Unigraphics
USER_EXITS_API int USER_ods_check_pubrec_access | ( | tag_t | pubrec_tag, |
const char * | user_id, | ||
const char * | group_name, | ||
const char * | role_name, | ||
int | client_site_id, | ||
logical * | has_read_access | ||
) |
pubrec_tag | (I) |
user_id | (I) |
group_name | (I) |
role_name | (I) |
client_site_id | (I) |
has_read_access | (O) |
USER_EXITS_API int USER_ods_client_ask_extra_attributes | ( | int * | n_attrs, |
char *** | pr_pom_attr_names, | ||
char *** | attr_options | ||
) |
n_attrs | (O) Number of extended attributed to be populated on PubR |
pr_pom_attr_names | (OF) Attribute names on PubR to be added |
attr_options | (OF) Attribute options on PubR to be added |
USER_EXITS_API int USER_ods_client_publish_extra_attributes | ( | tag_t | object_to_publish, |
int | n_attrs, | ||
char ** | pr_pom_attr_names, | ||
char * | attr_values[] | ||
) |
object_to_publish | (I) Selected object to be published |
n_attrs | (I) Number of extended attributed to be populated on PubR |
pr_pom_attr_names | (I) Attribute names on PubR to be added |
attr_values | (O) Attribute values on PubR to be added |
USER_EXITS_API int USER_ods_publish_object | ( | int | ods_site_id, |
tag_t | object_tag | ||
) |
ods_site_id | (I) |
object_tag | (I) |
USER_EXITS_API int USER_preinit_module | ( | void | ) |
USER_EXITS_API int USER_process_keyword_search_results | ( | const char * | name, |
FILE * | f_ptr, | ||
int * | num_found, | ||
tag_t ** | results | ||
) |
name | (I) |
f_ptr | (I) |
num_found | (O) |
results | (OF) num_found |
Method to generate a name for a new BOMView.
The default implementation of this function calls PS_system_default_bom_view_name.
item | (I) Item of the BOMView |
view_type | (I) View type of the BOMView |
name | (OF) |
Method used to generate a name for a new BOMView Revision.
The default implementation of this function calls PS_system_default_bvr_name.
item_rev | (I) Item Revision of the BOMView Revision |
view_type | (I) View type of the BOMView Revision |
name | (OF) |
This user exit is called when an appearance requires its mapped attributes to be updated. This is called once for each attribute mapping that has its external flag set. This user exit can then use APPR_ask_attr_mapping to obtain details of the mapping being invoked, and APPR_set_attr_value to set the mapped attribute.
Return Values:
APPR_no_mapping_logic_defined - No mapping code has been implemented for the given mapping.
appr | (I) Appearance that requires its mapped attributes to be updated |
parent | (I) Parent BOMViewRevision of Occurrence |
occ | (I) Occurrence being mapped to the Appearance |
mapping | (I) Attribute Mapping |
USER_EXITS_API int USER_query_execute | ( | const char * | name, |
int | num_args, | ||
char ** | keys, | ||
char ** | values, | ||
int * | n_columns, | ||
char *** | col_names, | ||
QRY_user_query_row_t ** | rows | ||
) |
Allows the custom-programmer to replace both the query mechanism and the display mechanism.
This means the query can return information which is not necessarialy contained in Tc objects. (see TC_ROOT/sample/examples/user_query.c)
It is requried to execute "TC_ROOT/bin/tc_set_query_where_run" with argument value "-run=user".
name | (I) The name of the query to be executed |
num_args | (I) The number of arguments |
keys | (I) The keys of the arguments |
values | (I) The values of the arguments |
n_columns | (O) The number of the columns(stored in the col_names) |
col_names | (OF) The names of the columns for the result (stored in the rows) |
rows | (OF) n_columns The resulting rows |
USER_EXITS_API int USER_query_free_rows | ( | QRY_user_query_row_t * | rows, |
int | n_columns | ||
) |
rows | (I) |
n_columns | (I) |
USER_EXITS_API int USER_query_map_row | ( | const char * | query_name, |
const QRY_user_query_row_t * | row, | ||
tag_t * | tag | ||
) |
query_name | (I) |
row | (I) |
tag | (O) |
USER_EXITS_API int USER_register_aiws_extensions | ( | ) |
USER_EXITS_API void USER_register_bomline_attrs | ( | char * | attr_class | ) |
User can register PSE bomline attributes for display
attr_class | (I) |
USER_EXITS_API int USER_register_plmxml_actions | ( | ) |
USER_EXITS_API int USER_register_plmxml_export_methods | ( | ) |
USER_EXITS_API int USER_register_plmxml_filters | ( | ) |
USER_EXITS_API int USER_register_plmxml_import_methods | ( | ) |
USER_EXITS_API int USER_register_plmxml_schema_mappings | ( | ) |
USER_EXITS_API int USER_register_properties | ( | void | ) |
Registers methods to customize properties on types.
Within this function, the programmer will register a method with message name TCTYPE_init_user_props_msg for each type for which customization is desired.
See smp_user_props.c for sample code.
USER_EXITS_API int USER_register_report_columns | ( | void | ) |
USER_EXITS_API int USER_register_tcplmxml_actions | ( | ) |
USER_EXITS_API int USER_register_tcplmxml_filters | ( | ) |
pff_tag | (I) |
n_tags | (I) |
obj_tags | (I) |
USER_EXITS_API char* USER_rev_file_name | ( | const char * | old_file_name | ) |
Method to generate a file name for a dataset using a name that was generated using the Teamcenter scheme. The name is parsed and rebuilt using the values found while parsing.
The format of the name is: dname_refname_date.ext
The generated file name should be freed by calling free() rather than MEM_free().
old_file_name | (I) Original File Name |
USER_EXITS_API int USER_string_compare | ( | const char * | s1, |
const char * | s2 | ||
) |
s1 | (I) |
s2 | (I) |
USER_EXITS_API void* user_StringLtoRCreate | ( | char * | text | ) |
USER_EXITS_API int USER_synchronize_baseline | ( | const char * | fullFilePathName | ) |
fullFilePathName | (I) |
USER_EXITS_API int USER_validate_alt_id | ( | tag_t | idcontext_tag, |
const char * | idfr_type, | ||
const char * | new_id, | ||
const char * | pattern_name, | ||
char ** | modified_id, | ||
IDValid_e * | status | ||
) |
idcontext_tag | (I) |
idfr_type | (I) |
new_id | (I) |
pattern_name | (I) |
modified_id | (OF) |
status | (O) |
USER_EXITS_API int USER_validate_alternate | ( | tag_t | idcontext_tag, |
tag_t | identifiable_tag, | ||
tag_t | altid_type, | ||
tag_t | altid_tag, | ||
logical * | is_valid | ||
) |
idcontext_tag | (I) |
identifiable_tag | (I) |
altid_type | (I) |
altid_tag | (I) |
is_valid | (O) |
USER_EXITS_API int USER_validate_dataset_name | ( | tag_t | old_owner, |
tag_t | old_dataset, | ||
const char * | new_item_id, | ||
const char * | new_revision_id, | ||
const char * | item_type, | ||
const char * | dataset_name, | ||
logical * | valid | ||
) |
User exits for saveas project
This function is required to set valid to true or false depending on whether or not dataset_name is a valid dataset name for the given parameters. If customizing, then the test done on the name is entirely up to the site. However, it is sensible to ensure that USER_copied_datasets_details and USER_copied_dataset_name return names which pass this validation test. (An example of the use of this user exit: NX will effectively call this function once a user has entered or modified the dataset name, and will tell the user whether or not it is valid)
Default Implementation
If SP3 (force_name_validation) is true, valid is set to true or false depending on whether or not dataset_name can be matched onto SP1 (pattern) using the parameters given. If SP3 is false, the function returns true for any input.
old_owner | (I) Tag of the old revision |
old_dataset | (I) Tag of the old dataset |
new_item_id | (I) Item ID for the new item (has not necessarily been created yet) |
new_revision_id | (I) Revision ID for the new revision (has not necessarily been created yet) |
item_type | (I) Item type for the new item (has not necessarily been created yet) |
dataset_name | (I) String containing the dataset name to be validated |
valid | (O) A logical indicating whether the name specified is valid |
USER_EXITS_API int USER_validate_id | ( | char * | boType, |
int | nKey, | ||
char ** | keys, | ||
char ** | values, | ||
logical * | isValid | ||
) |
boType | (I) The type name |
nKey | (I) Number of MFK key |
keys | (I) List of MFK keys |
values | (I) List of MKF vlaues |
isValid | (O) The result of ID validation |
USER_EXITS_API int USER_validate_item_rev_id | ( | const char * | item_id, |
const char * | rev_id, | ||
const char * | item_type, | ||
char ** | modified_item_id, | ||
char ** | modified_rev_id, | ||
IDValid_e * | status | ||
) |
This user exit is called when a user chooses OK or Apply in the Item Creation or Save As dialog boxes. It can verify that the IDs meet certain criteria and, if necessary, return modified IDs. If this function returns with status set to invalid, then the user can either accept the modified IDs (if supplied), or cancel the create. If this function returns with status set to modified, then the user can choose whether to use the modified IDs, force the system to use the originally entered IDs, or cancel the create. If this function returns with status set to override, then the modified IDs will be used without informing the user (this is helpful for performing case conversions).
item_id | (I) Item ID entered in the dialog box by the user. |
rev_id | (I) Item Revision ID entered in the dialog box by the user. |
item_type | (I) Item type entered into the dialog box by the user. This may be NULL. |
modified_item_id | (OF) New modified Item ID. Set this to NULL to indicate that no modification has been made. |
modified_rev_id | (OF) New, modified Item Revision ID. Set this to NULL to indicate that no modification has been made. |
status | (O) Indicates the result of the checks. May be one of the following: USER_valid_id - IDs are OK. USER_invalid_id - IDs are not acceptable. USER_modified_id - IDs are not ideal, but can be used if the user really wants them. USER_override_id - IDs are not acceptable. Silently use the modified ones instead. |
USER_EXITS_API int USER_validate_item_rev_id_2 | ( | const char * | item_id, |
const char * | rev_id, | ||
const char * | item_type, | ||
char ** | modified_item_id, | ||
char ** | modified_rev_id, | ||
IDValid_e * | status_item_id, | ||
IDValid_e * | status_rev_id | ||
) |
Validates the item and item revision identifiers selected for a new item revision. This function may reject the supplied IDs, accept them or modify them. This action is reflected in the value of status.
Compared to the USER_validate_item_rev_id function, this "_2" returns a more granular valid status - separate status for Item id and Revision Id.
item_id | (I) Item ID entered in the dialog box by the user. |
rev_id | (I) Item Revision ID entered in the dialog box by the user. |
item_type | (I) Item type entered into the dialog box by the user. This may be NULL. |
modified_item_id | (OF) New modified Item ID. Set this to NULL to indicate that no modification has been made. |
modified_rev_id | (OF) New, modified Item Revision ID. Set this to NULL to indicate that no modification has been made. |
status_item_id | (O) Indicates the result of the checks. May be one of the following: USER_valid_id - IDs are OK. USER_invalid_id - IDs are not acceptable. USER_modified_id - IDs are not ideal, but can be used if the user really wants them. USER_override_id - IDs are not acceptable. Silently use the modified ones instead. |
status_rev_id | (O) Indicates the result of the checks. May be one of the following: USER_valid_id - IDs are OK. USER_invalid_id - IDs are not acceptable. USER_modified_id - IDs are not ideal, but can be used if the user really wants them. USER_override_id - IDs are not acceptable. USER_duplicate_id - ID is duplicate with existing Silently use the modified ones instead. |
USER_EXITS_API int USER_validate_item_rev_id_3 | ( | const char * | item_id, |
const char * | rev_id, | ||
const tag_t | item_tag, | ||
const char * | item_type, | ||
char ** | modified_item_id, | ||
char ** | modified_rev_id, | ||
IDValid_e * | status_item_id, | ||
IDValid_e * | status_rev_id | ||
) |
item_id | (I) Item ID entered in the dialog box by the user. |
rev_id | (I) Item Revision ID entered in the dialog box by the user. |
item_tag | (I) Item tag for Item Revise. For new Item this should be NULLTAG |
item_type | (I) Item type entered into the dialog box by the user. This may be NULL. |
modified_item_id | (OF) New modified Item ID. Set this to NULL to indicate that no modification has been made. |
modified_rev_id | (OF) New, modified Item Revision ID. Set this to NULL to indicate that no modification has been made. |
status_item_id | (O) Indicates the result of the checks. May be one of the following: USER_valid_id - IDs are OK. USER_invalid_id - IDs are not acceptable. USER_modified_id - IDs are not ideal, but can be used if the user really wants them. USER_override_id - IDs are not acceptable. Silently use the modified ones instead. |
status_rev_id | (O) Indicates the result of the checks. May be one of the following: USER_valid_id - IDs are OK. USER_invalid_id - IDs are not acceptable. USER_modified_id - IDs are not ideal, but can be used if the user really wants them. USER_override_id - IDs are not acceptable. USER_duplicate_id - ID is duplicate with existing Silently use the modified ones instead. |
USER_EXITS_API int USER_validation_post_action | ( | tag_t | target, |
logical | validation_result, | ||
int | validation_status | ||
) |
USER_EXITS_API int USER_where_used | ( | char * | bo_type, |
tag_t | bo_tag, | ||
tag_t | revision_rule, | ||
int * | num_parents, | ||
tag_t ** | parents, | ||
int ** | levels | ||
) |
Identifies all the parent Item and ItemRevision objects in the structure where input bo_tag
is used.
This calls BMF_where_used message to execute the custom implementation available against the BMF_where_used message.
bo_type | (I) The type name |
bo_tag | (I) The object tag |
revision_rule | (I) The revision rule tag |
num_parents | (O) The number of parent object tags |
parents | (OF) num_parents The Parent object tags where input bo_tag is used |
levels | (OF) num_parents The Level of parent |