Assembly Configuration
Auxiliary Files
BOM Line Validation/CATPart, CATProduct Datasets
Check In/Check Out
Datasets
Export as reference/Load as reference
External Files
Foreign Files
Import Spreadsheet
Item and Item Revision
Item Revision
Item Revision Rule
JT
Load
Occurrences
Replace by revision
Save
Save New Revision
extern int ExportedByCatiaCustom
cat_USER_assyconfig_dataset_info
(tag_t i_itemrev_tag, /* <I> */
tag_t i_bomwindow_tag, /* <I> */
tag_t i_dataset_type_tag, /* <I> */
tag_t i_relation_type_tag, /* <I> */
char io_dataset_id[AE_dataset_id_size_c+1], /* <IO> */
char io_dataset_rev [AE_dataset_rev_size_c+1], /* <IO>
*/
char io_dataset_name[WSO_name_size_c+1], /* <IO>
*/
char io_dataset_desc [WSO_desc_size_c+1]) /* <IO> */
Attributes
i_itemrev_tag : tag of the item revision top
line where the Assembly Configuration dataset will be attached;
i_bomwindow_tag: tag of the BOM window
i_dataset_type_tag : the tag of the Assembly
Configuration dataset type
i_relation_type_tag: the tag of the relation
type between the item revision and the Assembly Configuration dataset
io_dataset_id : the dataset id built by the function
io_dataset_rev: the dataset rev built by the
function
io_dataset_name: the dataset name built by the
function
io_dataset_desc: the dataset description built
by the function
Description
This function is used before an Assembly Configuration dataset is created. It returns the id, the revision, the name and description with which the dataset will be created, according to information retrieved from the item revision, dataset type and relation.
extern int ExportedByCatiaCustom
cat_USER_build_assyconfig_file_name
tag_t i_itemrev_tag, /* <I> */
tag_t i_bomwindow_tag, /* <I> */
tag_t i_dataset_type_tag, /* <I> */
char **iop_file_name ) /* <IO> */
Attributes
i_itemrev_tag : tag of the item revision top
line where the Assembly Configuration dataset will be attached;
i_bomwindow_tag: tag of the BOM window
i_dataset_type_tag : the tag of the Assembly
Configuration dataset type
iop_file_name: the filename of the assembly configuration
xml file built by the function.
Description
This function allows the user to define the Assembly Configuration name to save in the dataset. By default, this function returns NULL. In this case, the file name is built by the Integration as following :
<itemId>_<itemRevId>_<RevRule> *
*RevRule corresponds to the active revision rule name of the BOM window.
cat_USER_auxiliaryFilesInfo customizes the filename of auxiliary files. This function is used during save processes.
extern int ExportedByCatiaCustom
cat_USER_auxiliaryFilesInfo (
StructUserDerivedFiles_s i_primary_element,
/* <I> */
int
i_auxiliaryfiles_tab_size, /* <I> */
StructUserDerivedFiles_s
*iop_auxiliaryfiles_tab) /* <I/O> */
{
return(!ITK_ok);
}
typedef struct StructUserDerivedFiles {
tag_t itemrev_tag; /*
<I> item rev tag */
tag_t dataset_tag; /*
<I> dataset tag */
logical created_in_tc /*
<I> flag used to indicate if the dataset has been created during
the current process */
char *original_file_name; /* <I> name of
the file on disk (name of external files, null if auxiliary files)*/
char *file_name; /*
<I/O> name of the file built by the Integration: customizable in
the entry point */}
StructUserDerivedFiles_s;
Attributes
i_primary_element : information about the
primary dataset (StructUserDerivedFiles structure);
i_auxiliaryfiles_tab_size: size of iop_auxiliaryfiles_tab
tab;
iop_auxiliaryfiles_tab : tab of auxiliary files
related to the primary datatset
Description
This method is used to customize the filename of Auxiliary files. This function is used during the save and save as/revise post-action processes. The default value for the filename is datasetname_datasetuuid.
The original_file_name parameter must be copied into the file_name parameter of the StructUserDerivedFiles structure to retain the CATIA original file name.
cat_USER_verifyDatasetCreation validates the selected BOM line prior to creating a CATPart or CATProduct dataset.
extern int ExportedByCatiaCustom
cat_USER_verifyDatasetCreation (
tag_t bomline, /*
<I> */
const char* dsType , /*
<I> */
logical* skipCreation, /* <O>
*/
char** message ) /*
<O> */
Attributes
bomline
: tag of the selected
BOM line;
dsType
: dataset type corresponding to the selected line;
skipCreation
: skip dataset creation;
message
: message to return;
Description
This user exit is called after a preliminary verification of the BOM
line is made for dataset creation from the CATIAV5 menu. When the returned
error value is not ITK_ok
the processing of the structure is aborted. The message returned is reported
as an error. When the returned error value is ITK_ok,
and the skipCreation value is set to true
, the BOM
line is skipped and the message is reported to the user as a warning.
extern int ExportedByCatiaCustom
cat_USER_entry_point_after_check_all_components ( int check_in_out,
/* <I> */ USER_Part_s
*datasets_tab, /* <I> */ int
nb_datasets ) /*
<I>*/
Attributes
check_in_out
: value of
the check command selected in CATIA: 0 if check out; 1 if check in;
datasets_tab
: tab of checked datasets;
nb_datasets
: number of checked datasets.
Description
This function defines an entry point after the Check-In or Check-Out command in Teamcenter.
If the command is Check-in, the USER_Part_s tab contains all components checked in by the process.
If a component is already checked in before the check in process, this component will not be set in the tab.
If the command is Check-out, the USER_Part_s tab contains all components checked out by the process.
If a component is already checked out before the check out process, this component will not be set in the tab.
If the command is Save, the USER_Part_s tab contains all components checked out or checked in by the process.
If a component is checked out and the Save command is performed with the Check-in option, the component is put in the tab.
If a component is Save as New, but without the Check-in option, the component is put in the tab. Otherwise, the component is not put in the tab.
The USER_Part_s type is a structure defined as follows :
typedef struct USER_Part
{
char dataset_uid[28];
char item_id [ITEM_id_size_c];
char item_rev_id[ITEM_id_size_c];
} USER_Part_s;
extern int ExportedByCatiaCustom
cat_USER_build_dataset_name (tag_t i_item_rev, /* <I> */
tag_t
i_dataset_type, /* <I> */
tag_t
i_relation_type, /* <I> */
char
io_dataset_name[WSO_name_size_c+1]) /* <O> */
Attributes
i_item_rev
: The tag of
the Item Revision;
i_dataset_type
: The tag of the dataset type
i_relation_type
: The tag the relation type between the dataset
and the item revision
io_dataset_name
: The dataset name built by the function
Description
This function is used before a Dataset is created from a CATIA V5 component. It returns the Dataset name.
By default, the name of the dataset is the result of the call to USER_new_dataset_name or as entered in the Save dialog.
The USER_new_dataset_name ITK function does not take
the dataset name into account.
When USER_new_dataset_name returns an error or a null dataset_name, the
cat_USER_build_dataset_name also returns an error or an empty dataset_name.
When the dataset name is empty, the dataset name is built with the ItemId/ItemRevId
rule.
If errors occur, an Unable to create the dataset name error message
displays and the Save process stops.
extern int ExportedByCatiaCustom
cat_USER_buildFileName ( tag_t i_item_rev_tag, /*
<I> */
tag_t
i_dataset_tag, /*
<I> */
char
**iiop_file_name); /* <I/OF> */
Attributes
i_item_rev_tag
: tag of
the Item Revision
i_dataset_tag
: tag of the Dataset
iop_file_name
: the filename built by the function.
Description
This function is used when the Integration builds the FileName’s primary object during Save or Load process. It returns the FileName customization implemented in the entry point function.
By default, the FileName of the primary object is build according to CATIA_xxx_file_name_format preference value. For instance, the CATPart documents' FileName is built according to CATIA_part_file_name_format preference value which is itemID_itemRevID, by default.
extern int ExportedByCatiaCustom
cat_USER_buildPartNumber ( tag_t i_item_rev_tag, /*
<I> */
tag_t
i_dataset_tag, /*
<I> */
char
**iiop_partnumber); /* <I/OF> */
Attributes
i_item_rev_tag
: tag of
the Item Revision
i_dataset_tag
: tag of the Dataset
iop_partnumber
: the part number built by the function.
Description
This function is used when the Integration builds the PartNumber’s primary object during Save or Load process. It returns the PartNumber customization implemented in the entry point function.
By default, the FileName of the primary object is build according to Teamcenter mapping or the value of the CATIA_MAP_Property_PartNumber preference.
extern int ExportedByCatiaCustom
cat_USER_get_dataset_revision ( tag_t item_rev_tag, /*
<I> */
tag_t
dataset_tag, /*
<I> */
int
*dataset_revision ) /* <O> */
Attributes
item_rev_tag
: tag of the
Item Revision
dataset_tag
: tag of the Dataset
dataset_revision
: returned dataset revision value.
Description
This function defines an entry point to allow the user to define the dataset revision used when creating the dataset, for Save As New and Save As New Revision processes. It is called after creating the dataset.
If this function returns a FailCode or if the dataset revision value is not greater than 1, no dataset revision will be set to the dataset, then the dataset revision will be 1.
If this function returns a valid revision number, and only
in this case, this revision number is assigned to the dataset and its
anchor. Two saves are performed, one on the dataset anchor and one on
the dataset itself.
If this function is not customized or returns a FailCode or a revision
number greater than 1, only the dataset will be saved.
extern ExportedByCatiaCustom cat_USER_is_default_dataset
(tag_t
i_item_rev_tag, /*
<I> */
tag_t
*ip_dataset_tag_tab, /* <I> */
tag_t
*ip_relation_tag_tab, /* <I> */
int
i_dst_tab_size, /*
<I> */
logical
*op_is_default_dataset, /* <O> */
tag_t
*op_dst_tag) /* <O> */ )
Attributes
i_item_rev_tag : tag of the item revision;
ip_dataset_tag_tab : array of dataset tags, all
datasets have the same type (entry point is called several times when
different dataset types exist under the item revision)
ip_relation_tag_tab: array of relation tags between
an item revision and each dataset of i_dataset_tag_tab
i_dst_tab_size: size of i_dataset_tag_tab and
i_relation_tag_tab
op_is_default_dataset : flag indicating if a
default dataset is found
op_dst_tag: tag of the default dataset: should
be not NULLTAG if o_is_default_dataset = true and if there are many datasets
of the same type under the item revision (i_dst_tab_size > 1)
Description
This entry point is called during the Load process, when datasets attached to a part item revision are read. It permits UserA to load an assembly with specific foreign files and UserB to load the same assembly with CATPart files depending on settings within Teamcenter preferences.
This function allows the user to indicate which dataset will be a default dataset, i.e., which dataset to load, depending on the dataset type defined in ip_dataset_tag_tab list.
The CATIA_component_dataset_types setting in Teamcenter preferences is read to define the datasets types' priority. This preference is taken into account when op_is_default_dataset parameter returns false.
This function is called for each dataset type defined in the list returned by the CATIA_CATPart_dataset_type, CATIA_catia_dataset_type and CATIA_component_dataset_types preferences on a leaf assembly.
When op_is_default_dataset parameter returns true:
When i_dst_tab_size is equal to 1, the default dataset is returned in i_dataset_tag_tab.
When i_dst_tab_size is greater than 1, the default dataset is returned in o_dst_tag.
When o_dst_tag is NULLTAG, the default dataset search continues.
extern int ExportedByCatiaCustom
cat_USER_validateCacheDatasetForLoad(tag_t i_geo_dataset, /*
<I> */
tag_t
i_cache_dataset, /*
<I> */ tag_t i_load_as_cgr_process,
/* <I>
*/ tag_t *op_is_cache_dataset_valid)
/* <O> */
Attributes
i_geo_dataset
: tag of
the geometry dataset;
i_cache_dataset
: tag of the cache dataset;
i_load_as_cgr_process
: boolean to specify when it is a Load
as cgr process;
op_is_cache_dataset_valid
: boolean to specify if the cache
dataset is empty
Description
This entry point is called during the Load process, when datasets attached to a part item revision are read. It allows the user to customize the criteria used to determine when a cache dataset is valid for a Load as cgr process. When a cache dataset is not valid, the geometry dataset is loaded instead of the cache, even when the Load as cgr option is activated.
This entry point reads the CATIA_cache_validate_dataset_for_load preference but takes priority over the preference value.
This method enhances the Export as reference and Load as reference processes which permits exporting and loading structures to a reference directory.
cat_USER_buildReferencePrefixSuffix(tag_t i_bom_window,tag_t
i_item_rev_tag,
tag_t
i_dataset_tag,
char
*i_named_ref_type,
tag_t
i_file_tag,
EnumUSERReferenceType
i_type,
char
**op_prefix,
char
**op_suffix)
Attributes
i_bom_window
: BOM window tag;
i_item_rev_tag: Item revision tag;
i_dataset_tag
: Dataset tag;
i_named_ref_type
: Named reference type to be loaded;
i_file_tag
: file tag in the dataset's named reference;
i_type
: data type (must be a top level, component node,
product node or leaf);
op_prefix
: prefix;
op_suffix
: suffix;
Description
This method enables the user to define an additional prefix and suffix for the file name in order to avoid file conflicts and staging conflicts. By default, it returns !ITK_ok, therefore only the CATIA_reference_prefix preference value is applied.
The file names are built according to the preference, prefix and suffix values. Refer to the following table:
Prefix Value? | Suffix Value? | Result |
---|---|---|
no | no | file name = valuePref_fileName |
yes | no | file name = valuePref_FonctionPrefixValue_fileName |
no | yes | file name = valuePref_fileName_FonctionSuffixValue |
yes | yes | file name = aluePref_FonctionPrefixValue_fileName_FonctionSuffixValue |
cat_USER_buildReferencePrefixSuffixPartNumber(tag_t i_bom_window,tag_t
i_item_rev_tag,
tag_t
i_dataset_tag,
char
*i_named_ref_type,
tag_t
i_file_tag,
EnumUSERReferenceType
i_type,
char
**op_prefix,
char
**op_suffix)
Attributes
i_bom_window
: BOM window tag;
i_item_rev_tag: Item revision tag;
i_dataset_tag
: Dataset tag;
i_named_ref_type
: Named reference type to be loaded;
i_file_tag
: file tag in the dataset's named reference;
i_type
: data type (must be a top level, component node,
product node or leaf);
op_prefix
: prefix;
op_suffix
: suffix;
Description
This method enables the user to define an additional prefix and suffix for the part in order to avoid part number conflicts. By default, it returns !ITK_ok, therefore only the CATIA_reference_prefix_partnumber preference value is applied.
The part numbers are built according to the preference, prefix and suffix values. Refer to the following table:
Prefix Value? | Suffix Value? | Result |
---|---|---|
no | no | part number = valuePref_partNumber |
yes | no | part number = valuePref_FonctionPrefixValue_partNumber |
no | yes | part number = valuePref_partNumber_FonctionSuffixValue |
yes | yes | part number = valuePref_FonctionPrefixValue_partNumber_FonctionSuffixValue |
cat_USER_externalFilesInfo customizes the filename of external files. This function is used during save processes.
extern int ExportedByCatiaCustom
cat_USER_externalFilesInfo (
StructUserDerivedFiles_s i_primary_element,
/* <I> */
int
i_externalfiles_tab_size, /* <I> */
StructUserDerivedFiles_s
*iop_externalfiles_tab) /* <I/O> */
{
return(!ITK_ok);
}
typedef struct StructUserDerivedFiles {
tag_t itemrev_tag; /*
<I> item rev tag */
tag_t dataset_tag; /*
<I> dataset tag */
logical created_in_tc /*
<I> flag used to indicate if the dataset has been created during
the current process */
char *original_file_name; /* <I> name of
the file on disk (name of external files, null if external files)*/
char *file_name; /*
<I/O> name of the file built by the Integration: customizable in
the entry point */}
StructUserDerivedFiles_s;
Attributes
i_primary_element : information about the
primary dataset (StructUserDerivedFiles structure);
i_externalfiles_tab_size: size of iop_externalfiles_tab
tab;
iop_externalfiles_tab : tab of external files
related to the primary datatset
Description
This method is used to customize the filename of External files. This function is used during save processes. The default value for the filename is primary document filename.external file extension.
The original_file_name parameter must be copied into the file_name parameter of the StructUserDerivedFiles structure to retain the CATIA original file name.
extern ExportedByCatiaCustom
char *cat_USER_build_foreign_file_name ( tag_t ItemRevTag, /*
<I> */ tag_t
DatasetTag, /* <I> */ char
*old_file_name ) /* <I> */
Attributes
ItemRevTag : tag of the item revision where the foreign dataset will
be attached;
DatasetTag
: tag of the foreign dataset where to save the
foreign file;
old_file_name
: old foreign file name.
Description
This function defines an entry point to allow the user to define the
foreign file name to save in the dataset. By default, this function returns
NULL. In this case, the file name is built like following:
<old_file_name>_<dataset_uid>.<extension>
Modifications to the dataset name or the dataset description in this function can be performed. However, do not save the dataset after these modifications using the AOM_save function, it will be performed later in the code.
extern int ExportedByCatiaCustom
cat_USER_entry_point_customize_sprdsheet ( EXP_Part_s *part ) /*
<I/OF> */
Attributes
part
: An EXP_Part_s structure.
Description
This function customizes what is written to the spreadsheet during the Import process. It takes an EXP_Part_s structure as parameter, defined below.
typedef struct EXP_Part
{
tag_t itemRev_tag;
tag_t *dst_tag;
int dst_nbr;
char OEM_fileName[257];
char OEM_partNbr[129];
char OEM_def[129];
char OEM_rev[129];
char OEM_nomenc[129];
char OEM_desc[257];
char OEM_dlname[129];
char
item_id[128];
char itemRev_id[128];
char item_type[ITEM_type_size_c
+ 1];
char dst_type[WSO_name_size_c
+ 1];
char item_co[8];
char itemRev_co[8];
char dst_co[8];
char bvr_co[8];
char status[8];
char **userProps;
int nbUserProps;
char **newData;
int newData_nbr;
} EXP_Part_s;
The newData field can be used to add data in the spreadsheet. These
data will then be added at the end of the current line. The newData_nbr
must be set to the number of strings added at the end of the line.
extern int ExportedByCatiaCustom
cat_USER_find_stencil_item_rev_tag ( const char item_id[32], /*
<I> */ tag_t
*item_tag, /*
<0> */ tag_t
*item_rev_tag ) /* <O> */
Attributes
item_id
: The ID of the
Item;
item_tag
: The Item Tag returned by the function;
item_rev_tag
: The Item Revision Tag returned by the function.
Description
This function is used before a Dataset without a reference name is loaded in CATIA V5. It returns the item tag and the item revision tag of the seed document's item ID. By default, the item revision tag is the latest item revision tag.
extern int ExportedByCatiaCustom
cat_USER_verify_item_and_rev ( char item_id[32], /*
<I> */
char
item_rev_id[32], /* <I> */
char
item_type[32], /* <I> */
tag_t
item_tag, /* <I>
*/
tag_t
item_rev_tag ) /* <I> */
Attributes
item_id
: ID of the Item;
item_rev_id
: ID of the Item Revision;
item_type
: type of the Item;
item_tag
: tag of the Item;
item_rev_tag
: tag of the Item Revision.
Description
This function is used to define an entry point during the save and supplier import form processes. It allows the user to validate the IDs (according to naming rules, for instance) and returns modified values under some circumstances.
For the import process, this entry point is used during the reading of the desc file. If one or more IDs are invalid, the process is stopped and an error file is created listing the invalid IDs.
For the save process, this entry point is used after OK is selected in the Save Item panel. If an ID is invalid, the panel is displayed again.
cat_USER_getLatestRevision returns the latest item revision of the input revision list corresponding to the CATIA_latest_revision_set_type preference definition.
extern int ExportedByCatiaCustom
cat_USER_getLatestRevision (tag_t *ip_item_rev_list , /*
<I> */
int
i_item_rev_list_size , /*
<I> */
tag_t
*op_item_rev_tag) /*
<O> */
Attributes
ip_item_rev_list: list of item revision tag;
i_item_rev_list_size: size of item revision tag
list;
op_item_rev_tag : NULLTAG if no match is found
or tag of the returned item revision;
Description
This function is used to customize the latest revision type to return and is used in the Import, Replace by revision and Save processes. Use the CATIA_latest_revision_set_type preference to filter elements returned by Import Query during spreadsheet creation and to determine the latest revision type to return.
extern int ExportedByCatia cat_PV_catia2jt_next ( tag_t item_rev_tag, /* <I> */ int DMdtsProcess ) /* <I> */
Attributes
item_rev_tag
: tag of the
Item Revision;
DMdtsProcess
: must be set to 1 to avoid a recursivity.
Description
This function creates or updates the JT dataset if necessary to save a new jt file and calls the catia2jt script.
extern int ExportedByCatiaCustom
cat_USER_buildJTFromNXFilename(tag_t i_item_rev_tag, /*
<I> */
tag_t
i_dataset_tag, /*
<I> */
char
*i_named_ref_type, /*
<I> */
tag_t
i_file_tag, /*
<I> */
char
*i_foreignfilename_format, /* <I> */
char
**iop_exported_file_name); /* <I/OF> */
Attributes
i_item_rev_tag: Item revision tag;
i_dataset_tag: Dataset tag of the JT from NX;
i_named_ref_type: Named reference type to be
loaded;
i_file_tag: File tag of the JT from NX;
i_foreignfilename_format: CATIA_foreignfile_file_name_format
preference value;
io_exported_file_name: Filename used to export
the JT file from the staging directory;
Description
This method builds a unique filename for JT datasets created with NX. By default, the filename is built based on the CATIA_foreignfile_file_name_format preference value. This function is called in all load processes.
Teamcenter Integration for CATIA V5 supports direct loading of JTs to CATIA V5 when a license to use Theorem JT to load to CATIA V5 is available. JTs are delivered and inserted from CATIA and links to the JT file are maintained, with correct configurations. JT files are loaded to CATIA using Visualization or Design Mode, depending on the CATIA configuration.
When the returned filename is not unique in the assembly
to be loaded, a filename conflict displays.
When the function returns a failcode or a null filename, the filename for
the Named Reference is used to export the JT file from the staging directory.
extern int ExportedByCatiaCustom
cat_USER_haschildren( tag_t i_bom_line,
/* <I> */
tag_t
i_item_rev_tag, /*
<I> */
tag_t
i_bvr_tag, /*
<I> */
logical
*op_answer); /*
<O> */
Attributes
i_item_rev_tag : The tag
of the Item Revision
i_bom_line : The tag of the
BOMLine
i_bvr_tag
: The tag of the BOMViewRev
op_answer
: TRUE if the item corresponds to a Product.
Description
This function is used to determine if a given item will be loaded in CATIA as a Product or a Part depending on specific conditions.
Five boolean variables are available to define various combinations in order to determine which type of document will be loaded in CATIA.
ExistBVR
: Set to true if under the Item when
a BOMView type is defined in Teamcenter Preferences.
EmptyBvr
: Set to true
if the previous variable, ExistBVR
, is also true
and theassociated BOMView Revision does not contain occurrences.
ExistCATProduct : Set to true if the dataset type under the Item revision is defined in Teamcenter Preferences.
ExistCATPart : Set to true if the dataset type under the Item revision is defined in Teamcenter Preferences.
ExistOtherDataset : Set to true if the dataset type under the Item revision is defined in Teamcenter Preferences.
In this function, the CATIA_customize_load_process
setting defined in Teamcenter Preferences, is used by the VarCATIA_CUSTOM_LOAD
variable to determine the criterion used for the Load in CATIA.
When the CATIA_customize_load_process option
is set to 0 (default value) in Teamcenter
Preferences the process analyzes the branches of the BOM tree, and
stops when a node does not contain a valid CATIA BOM. In this case,
cat_USER_hasChildren
returns op_answer=FALSE
and the item is considered a leaf of the tree (component).
When CATIA_customize_load_process option is set to 1 in Teamcenter Preferences, the process analyzes the part and product datasets under the given item revision and checks whether the BOMView revision contains occurrences.
When CATIA_customize_load_process option is set to 2 in Teamcenter Preferences, the process analyzes the part, product, V4 model and foreign file datasets under the given item revision and checks whether the BOMView Revision contains occurrences.
The cat_USER_hasChildren
function returns op_answer=FALSE
,
indicating a part will be loaded, in three cases:
A CATPart/V4/Foreign File dataset exists and a CATProduct dataset and BOMView Revision do not exist.
A CATPart/V4/Foreign File dataset and BOMView Revision containing no occurrences exists and a CATProduct dataset does not.
A dataset and BOMView Revision do not exist.
File location: cat_USER_bom_customize.c
customer entry point:
cat_USER_isOccurrenceNonCAD
default return value:
false
Attributes
i_bom_line_tag <I>:
tag of the selected BOM line;
iopp_message_tab <IOF>
: contains customer messages;
a NULL pointer is given for the first call, customer must allow
this array themselves;
iop_size_message_tab <IO>
: iopp_message_tab array
size.
Use Teamcenter allocation functions (MEM_alloc, MEM_crealloc...). Do not use Standard C memory allocation functions.
Description
This entry point is called during the Load
and Save process, to check whether the instance
corresponding to the i_bom_line_tag must be loaded.
When this function returns true for i_bom_line_tag,
the instance is not loaded in CATIA; when it returns false
(default), the current instance is loaded in CATIA.
Remarks
The Entry point is not called for the root product of an assembly (top level); when the entry point always returns false, only the root product is loaded.
An error message displays when the PSE selection is a non-CAD occurrence or when one of its parents is a non-CAD occurrence.
File location: cat_USER_bom_customize.c
Customer Entry Point: cat_USER_isOccurrenceToBeLoaded
default return value: true
Attributes
i_top_line_item_rev_tag
,
/* <I> tag of top Node (assembly context)*/
i_occuid_path
: <I> occuid path of current item;
i_parent_item_rev_tag
: <I> tag of the parent item revision;
i_parent_bomvr_tag
: <I> tag of the parent BOMview revision;
i_item_rev_tag
: <I> tag of the item revision;
i_occ_tag
: <I> tag of the occurrence.
Description
This function is used during Load processes. The cat_USER_isOccurrenceToBeLoaded
entry point is called to determine if the instance corresponding to i_occ_tag
must be loaded. If this function returns false
for i_occ_tag,
the instance is not loaded in CATIA.
The entry point is not called for the assembly root product.
If the entry point always returns false
, only the root product
loads.
A warning message, specific to the Load Merge Target, Load Merge Selected,
and Refresh processes, displays when items are bypassed by this entry
point.
The cat_USER_getItemRevisionForReplaceByRevision method enhances the Replace by revision process which permits revising an item in CATIA with a specific revision.
cat_USER_getItemRevisionForReplaceByRevision
(tag_t
i_item_tag,
tag_t
i_item_rev_tag,
tag_t
*o_item_rev_list,
int
*o_item_rev_list_size);
Attributes
i_tag: Item tag of the selected element to
be replaced;
i_item_rev_tag: item revision tag of the selected
element to be replaced;
o_item_rev_list: list of item revisions available
for Replace By revision;
o_item_rev_list_size: list size;
Description
This method enables the user to define a list of item revisions to be displayed in the Replace By Revision panel.
By default, this method returns all item revisions accessible to the current user except the one corresponding to i_item_rev_tag.
extern int ExportedByCatiaCustom
cat_USER_entry_point_after_save_all_files ( USER_Part_s *datasets_tab,
/* <I> */ int
nb_datasets ) /*
<I> */
Attributes
datasets_tab
: The tab
of saved datasets;
nb_datasets
: The number of saved datasets.
Description
This function defines an entry point after the save of all files and all multi-links of an assembly during the save process. The USER_Part_s type is a structure defined like following :
typedef struct USER_Part
{
char dataset_uid[28];
char item_id [ITEM_id_size_c];
char item_rev_id[ITEM_id_size_c];
} USER_Part_s;
For example, use the cat_PV_catia2jt_next function to use the JT translator build JT datasets for all saved parts.
extern int ExportedByCatiaCustom
cat_USER_validateForSaveNewRevision (
tag_t i_item_tag, /*
<I> */
tag_t i_old_item_rev_tag, /* <I> */
char *i_new_item_rev_id, /* <I> */
tag_t i_dataset_type, /* <I>
*/
logical *op_is_valid, /* <O>
*/
char **op_message); /* <O> */
Attributes
i_item_tag
: item tag;
i_old_item_rev_tag
: item rev tag of the old revision. The
value is NULLTAG, by default, during the Import/Create ImportSpreadsheet
processes;
i_new_item_rev_id
: item revision ID of the new revision;
i_dataset_type
: dataset type tag;
op_is_valid
: boolean used to validate the new revision;
op_message
: message displayed in the Save Manager
Description
This function is used to validate the Save New Revision or Import New Revision mode.
When op_is_valid
= true; the default
behavior is used.
When op_is_valid
= false:
The Save process is not available and a message,
defined by op_message
displays in the Save Manager. If
op_message
has not been defined, the default message,
Unable to create a new revision displays.
extern int ExportedByCatiaCustom
cat_USER_secondary_dataset_info(
tag_t ItemRevTag, /*
<I> */
tag_t primary_object_tag, /*
<I> */
tag_t secondary_dataset_type_tag, /*
<I> */
tag_t relation_type_tag, /*
<I> */ char DstName[WSO_name_size_c+1], /*
<IO> */ char DatasetDescription[WSO_desc_size_c+1]) /*
<IO>*/
Attributes
ItemRevTag
: tag of the
Item Revision;
primary_object_tag
: tag of the primary object
secondary_dataset_type_tag
: the tag of the secondary dataset
type
relation_type_tag
: the tag of the relation
DstName
: the dataset name built by the function. It is truncated
after the function call to WSO_name_size_c or TC_LEGACY_ID_NAME_SIZE according
to the TC_Allow_Longer_ID_Name Teamcenter Preference
DatasetDescription
: the description of the dataset
Description
This function is used before a secondary dataset is created. It returns the name and description with which the dataset will be created, according to information retrieved from the Item Revision and the Drawing dataset the secondary dataset will be linked to. This function is currently used for:
Auxiliary datasets of CATParts, CATProducts, CATProcesses, and CATAnalysis'
Auxiliary vectorial dataset
CATComputation and CATAnalysis datasets
CATCache datasets
External datasets of CATParts, CATProducts, CATProcesses, CATAnalysis', and CATDrawings
If the auxiliary document is vectorial, the dataset name is defined by Item ID and ItemRev ID, by default.
If the auxiliary document is not vectorial, the dataset name is defined by sheet referenced by the auxiliary dataset, by default.
extern int ExportedByCatiaCustom
cat_USER_secondary_parts_info(
StructUserSecondaryPart_s
io_parent_prod, /* <I> */
int
i_secondary_parts_tab_size, /*
<I> */
StructUserSecondaryPart_s
**iop_secondary_parts_tab) /* <I/O>
*/
typedef struct StructUserSecondaryPart
{
tag_t dataset_tag; /*
<I> */
logical modified_in_catia; /*
<I> */
char *original_file_name; /*
<I> */
char *original_part_number; /*
<I> */
char *file_name; /*
<IO> */
char *part_number; /*
<IO> */
} StructUserSecondaryPart_s;
Attributes
io_parent_prod
: information
about the parent product of the secondary part;
i_secondary_parts_tab_size
: size of iop_secondary_parts_tab;
iop_secondary_parts_tab
: secondary part default value.
Description
This method is used to customize the filename and PartNumber of Secondary Parts. This function is used during save processes.
The default value for the filename is the CATProduct filename followed by dot (.) then an index. The default value for the partnumber is the CATProduct partnumber followed by dot (.) then the same filename index.
The original_file_name parameter must be copied into the file_name parameter and the original_part_number parameter must be copied into the part_number parameter of the StructUserSecondaryPart structure to retain the CATIA original file name and part number.
extern int ExportedByCatiaCustom
cat_USER_write_TTB_values ( char ***char_array,
/* <OF> */
int
*size_array, /* <O> */
tag_t
ItemRevTag, /* <I> */
tag_t
DatasetTag ) /* <I> */
Attributes
char_array
: array to be
written in, array transferred to client;
size_array
: number of lines;
ItemRevTag
: tag of the Item Revision;
DatasetTag
: tag of the Dataset.
Description
This function sends the user-defined name/value pairs to CATIA V5 in
order to complete the title block.
The pairs are sent via the string array because the file is written by
the client.
Each line shall be of the form "<type> <name>|<value>"
By default, <type> can be an Item, ItemRev, Dst, ItemMaster, ItemRevMaster
and <name> is an iMAN attributes name, such as Description, Name,
Owner, etc.
Item Name|GENERAL ASSEMBLY
ItemRev Revision|A
Mytype MY_ATTRIBUTE|MY_CHARACTER_STRING
The last example shows a line with a type, a name and a value that are not from Teamcenter, but that can be built in the function cat_USER_write_TTB_values.
This line must be written into the array like following :
char **array = (char**)MEM_alloc(sizeof(char*));
array[0]=(char*)MEM_alloc(128*sizeof(char));
strcpy(array[0],"Mytype MY_ATTRIBUTE|MY_CHARACTER_STRING");
(*char_array)=array;
(*size_array)=1;
With this example, the identifier of the CATIA V5 text to be updated
should be IM_CATIA_MYTYPE MY_ATTRIBUTE.
Therefore, the CATIA
V5 text will be replaced by MY_CHARACTER_STRING. The information
can be retrieved from the item revision or the dataset.