|
ITK Function Reference
(V10000.1.0.60_20160308.00) |
Modules | |
| ICS InClass | |
| ICS Defines | |
| ICS Enquiry | |
| ICS Errors | |
Typedefs | |
| typedef enum ICS_objectType_s * | ICS_ObjectType_p_t |
| typedef enum ICS_objectType_s | ICS_objectType_t |
Enumerations | |
| enum | ICS_objectType_s { ICS_ObjectType_unknown = 0, ICS_ObjectType_keylov = ( 1 << 0 ), ICS_ObjectType_attribute = ( 1 << 1 ), ICS_ObjectType_class = ( 1 << 2 ), ICS_ObjectType_view = ( 1 << 3 ), ICS_ObjectType_instance = ( 1 << 4 ), ICS_ObjectType_userclass = ( 1 << 5 ), ICS_ObjectType_all, ICS_ObjectType_max } |
| enum | ICS_type_t { ICS_type_unknown, ICS_type_group, ICS_type_class, ICS_type_class_attr, ICS_type_view, ICS_type_view_attr, ICS_type_unctdict, ICS_type_stxt, ICS_type_data, ICS_type_abstract_class, ICS_type_storrage_class } |
Functions | |
| ICS_API int | ICS_ask_image (tag_t groupOrClassOrView, tag_t *datasetTag) |
| ICS_API int | ICS_ask_instances_by_id (const char *theIcoId, int *theCount, tag_t **theInstanceTags) |
| ICS_API int | ICS_cancel_ico_by_rtico (tag_t objTag) |
| ICS_API int | ICS_classid_is_valid (char *cid, char *sid, logical *valid) |
| ICS_API int | ICS_exit_module () |
| ICS_API int | ICS_format_value (int howToFormat, int theFormat, const char *theMinValue, const char *theMaxValue, const char *theValue, char **theFormattedValue) |
| ICS_API int | ICS_init_hooks () |
| ICS_API int | ICS_init_module () |
| ICS_API int | ICS_is_tag_ics_runtime_obj (tag_t obj, logical *is_an_ics_rt_obj) |
| ICS_API int | ICS_receive_obj_created_from_nxmgr (tag_t item_tag, tag_t itemrev_tag, tag_t dataset_tag, int creation_type) |
| ICS_API int | ICS_resolve_attribute_id (tag_t wso, int attr_id, int vla_pos, tag_t *prop_tag, tag_t *type_tag) |
| ICS_API int | ICS_resolve_ico_id (tag_t wso, int ico_index, tag_t *prop_tag, tag_t *type_tag) |
| ICS_API int | ICS_save_ico_by_rtico (tag_t attrSyncTag) |
| ICS_API int | ICS_share_pending (int theSitesCount, const char **theSites, int theverbosity) |
Group/Class/View Functions | |||||||||||
| |||||||||||
| ICS_API int | ICS_ask_top_class (tag_t *topClass) | ||||||||||
| ICS_API int | ICS_find_class (const char *groupOrClassId, tag_t *groupOrClass) | ||||||||||
| ICS_API int | ICS_ask_id_name (tag_t groupOrClassOrView, char **id, char **name) | ||||||||||
| ICS_API int | ICS_find_view (tag_t theClass, const char *viewId, tag_t *view) | ||||||||||
| ICS_API int | ICS_ask_children (tag_t groupOrClass, int *nChildren, tag_t **children) | ||||||||||
| ICS_API int | ICS_ask_parent (tag_t theChid, tag_t *theParent) | ||||||||||
| ICS_API int | ICS_ask_instances (tag_t theClass, tag_t view, int *nInstances, tag_t **instances) | ||||||||||
| ICS_API int | ICS_ask_instance_count (const char *ClassOrViewId, int *nInstances) | ||||||||||
| ICS_API int | ICS_search_instances (tag_t theClass, tag_t view, int nAttributes, int *attributeUncts, char **queries, int *nInstances, tag_t **instances) | ||||||||||
| ICS_API int | ICS_search_object_ids (tag_t theClass, tag_t view, char *query, int *nInstances, tag_t **instances) | ||||||||||
| ICS_API int | ICS_ask_attributes (tag_t classOrView, int *nAttributes, tag_t **attributeList) | ||||||||||
| ICS_API int | ICS_describe_view (tag_t view, int *nAttributes, int **theAttrIDs, int **theAttrFormats, char ***theAttrAnnotations, char ***theAttrNames, char ***theAttrShortNames, char ***theAttrUnits, char ***theUserData1, char ***configField, char ***theUserData2, int **theFlags) | ||||||||||
| ICS_API int | ICS_describe_config_field (const char *configFieldString, int *multiField, logical *horizontal, logical *vertical, logical *separator, logical *arrow, logical *button, logical *wide, logical *mandatoryFlag, logical *protectedFlag, logical *uniqueFlag) | ||||||||||
| ICS_API int | ICS_create_view_attributes (tag_t view, int nAttributes, const char **attributeNames, tag_t **attributes) | ||||||||||
| ICS_API int | ICS_create_class_attributes (tag_t theClass, int nAttributes, int *unctNumbers, tag_t **attributes) | ||||||||||
| ICS_API int | ICS_create_view (tag_t theClass, const char *viewId, const char *viewName, tag_t *newView) | ||||||||||
| ICS_API int | ICS_ask_attribute_name (tag_t classOrView, tag_t attribute, char **attributeName) | ||||||||||
| ICS_API int | ICS_ask_attribute (tag_t classOrView, const char *attributeName, tag_t *attribute) | ||||||||||
| ICS_API int | ICS_describe_attribute (tag_t classOrView, tag_t attribute, int *unctNo, int *format, char **unit) | ||||||||||
Attribute Functions | |||||||
| |||||||
| ICS_API int | ICS_create_unct (int unctNo, const char *unctName, const char *shortName, const char *unctUnit, int unctFormat) | ||||||
| ICS_API int | ICS_describe_unct (int unctNo, char **unctName, char **shortName, char **unctUnit, int *unctFormat) | ||||||
| ICS_API int | ICS_describe_format (int format, int *formatType, int *modifier1, int *modifier2, int *length) | ||||||
| ICS_API int | ICS_get_popup_definition (int format, int *count, char ***optionIds, char ***optionValues) | ||||||
ICO Functions | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| ICS_API int | ICS_is_wsobject_classified (tag_t wsObject, logical *isClassified) | ||||||||||||||||||||||||
| ICS_API int | ICS_is_wsobject_classifiable (tag_t wsObject, logical *isClassifiable) | ||||||||||||||||||||||||
| ICS_API int | ICS_classify_wsobject (tag_t wsObject, tag_t classificationObject) | ||||||||||||||||||||||||
| ICS_API int | ICS_remove_classification (tag_t wsObject) | ||||||||||||||||||||||||
| ICS_API int | ICS_delete_reference_to_wsobject (tag_t wsObject) | ||||||||||||||||||||||||
| ICS_API int | ICS_delete_reference_to_ico (tag_t classificationObject) | ||||||||||||||||||||||||
| ICS_API int | ICS_delete_classification_object (tag_t classificationObject) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_classified_wsobject (tag_t classificationObject, tag_t *classifiedWSObject) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_classification_object (tag_t wsObject, tag_t *classificationObject) | ||||||||||||||||||||||||
| ICS_API int | ICS_create_classification_object (tag_t ws_object, const char *object_id, tag_t view_or_class_tag, tag_t *classification_object) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_class_of_classification_obj (tag_t classificationObject, tag_t *theClass) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_view_of_classification_obj (tag_t classificationObject, tag_t *view) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_classification_object_id (tag_t classificationObject, char **objectId) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_classification_instance_tag (tag_t theClass, tag_t theView, char *classificationObjectId, tag_t *classificationInstance) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_cid_sid_of_classification_obj (tag_t classificationObject, char **classId, char **viewId) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_attributes_of_classification_obj (tag_t classificationObject, int *nAttributes, char ***attributeNames, char ***attributeValues) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_attribute_value (tag_t classificationObject, const char *attributeName, char **attributeValue) | ||||||||||||||||||||||||
| ICS_API int | ICS_describe_classification_object (tag_t classificationObject, tag_t *view, int *nAttributes, int **unctNumbers, int **unctFormats, char ***attributeNames, char ***attributeValues, char ***units) | ||||||||||||||||||||||||
| ICS_API int | ICS_set_values_for_classification_obj (tag_t classificationObject, int nAttributes, const char **attributeNames, const char **attributeValues) | ||||||||||||||||||||||||
| ICS_API int | ICS_ask_type (tag_t object, int *objectType) | ||||||||||||||||||||||||
XML Import/Export Functions | |
The following ITK functions are used to support the XML import and export of Classification data. | |
| enum | ICS_xmlExport_Option_t { ICS_xmlexport_this = 0, ICS_xmlexport_parent = ( 1 << 1 ), ICS_xmlexport_parentview = ( 1 << 2 ), ICS_xmlexport_subclass = ( 1 << 3 ), ICS_xmlexport_subclassview = ( 1 << 4 ), ICS_xmlexport_Hierarchy = ( 1 << 5 ), ICS_xmlexport_parentinstance = ( 1 << 6 ), ICS_xmlexport_subclassinstance = ( 1 << 7 ), ICS_xmlexport_instancexml = ( 1 << 8 ), ICS_xmlexport_instanceschema = ( 1 << 9 ), ICS_xmlexport_usermode = ( 1 << 10 ) } |
| enum | ICS_xml_hook_id_t { ICS_xml_hook_create = 1, ICS_xml_hook_update = 2, ICS_xml_hook_export = 3 } |
| enum | ICS_xml_hook_type_t { ICS_xml_hook_pre = 1, ICS_xml_hook_post = 2, ICS_xml_hook_cancel = 3 } |
| typedef enum ICS_xml_hook_id_t * | ICS_xml_hook_id_p_t |
| typedef enum ICS_xml_hook_type_t * | ICS_xml_hook_type_p_t |
| typedef int(* | ICS_xml_hook_t )(ICS_xml_hook_id_t theHookId, ICS_xml_hook_type_t preOrPost, int theObjectType, const char *theObjectId) |
| ICS_API int | ICS_xml_register_hook (ICS_xml_hook_id_t theHookId, ICS_xml_hook_t theHook) |
| ICS_API int | ICS_xml_import (const char *theXMLFileName, int theObjectTypeFilter, logical theUpdateFlag, logical theRelatedCreationFlag) |
| ICS_API int | ICS_xml_export (const char *theXMLFileName, ICS_objectType_t nObjType, const char *theId, int theObjectTypeFilter, int theExportOptions) |
| ICS_API int | ICS_xml_ask_children (const char *theParentId, int theLevelCount, logical theAdminMode, int theSortOption, logical theXMLOption, char **theChildren) |
| #define | ICS_xml_hook_cancel_object 1 |
| #define | ICS_xml_cancel 2 |
Classification of your company's product data - standard parts, technology data, manufacturing equipment - saves time by making component data easier to find and retrieve and reduces costs by allowing you to reuse existing parts and consolidate and/or eliminate duplicate or out-dated parts. Teamcenter Classification is used to create and maintain a hierarchical classification structure based on the attribute values of your Teamcenter workspace objects.
You will use ICS-ITK to:
| #define ICS_xml_cancel 2 |
| #define ICS_xml_hook_cancel_object 1 |
| typedef enum ICS_objectType_s * ICS_ObjectType_p_t |
| typedef enum ICS_objectType_s ICS_objectType_t |
| typedef enum ICS_xml_hook_id_t * ICS_xml_hook_id_p_t |
| typedef int(* ICS_xml_hook_t)(ICS_xml_hook_id_t theHookId, ICS_xml_hook_type_t preOrPost, int theObjectType, const char *theObjectId) |
| typedef enum ICS_xml_hook_type_t * ICS_xml_hook_type_p_t |
| enum ICS_objectType_s |
| enum ICS_type_t |
| enum ICS_xml_hook_id_t |
| enum ICS_xml_hook_type_t |
Enums for Export Options. Currently this is applicable only to 'Class' objects. When export functions are called for an object of type class, these options can be given in the Export-Options parameter. If necessary, these options can be combined using '|' (bitwise OR) operator.
| Enumerator | |
|---|---|
| ICS_xmlexport_this | |
| ICS_xmlexport_parent |
1 |
| ICS_xmlexport_parentview |
(ICS_xmlexport_parent << 1) + ICS_xmlexport_parent |
| ICS_xmlexport_subclass |
(ICS_xmlexport_parent << 2) |
| ICS_xmlexport_subclassview | |
| ICS_xmlexport_Hierarchy |
(ICS_xmlexport_subclass << 2 ) + ICS_xmlexport_parent |
| ICS_xmlexport_parentinstance | |
| ICS_xmlexport_subclassinstance | |
| ICS_xmlexport_instancexml |
(ICS_xmlexport_subclass << 5) |
| ICS_xmlexport_instanceschema |
(ICS_xmlexport_subclass << 6) |
| ICS_xmlexport_usermode | |
For Classes / Views
| classOrView | (I) |
| attributeName | (I) |
| attribute | (O) |
For Classes / Views
| classOrView | (I) |
| attribute | (I) |
| attributeName | (OF) |
| ICS_API int ICS_ask_attribute_value | ( | tag_t | classificationObject, |
| const char * | attributeName, | ||
| char ** | attributeValue | ||
| ) |
For ICO's
Please note: - KeyLov attributes returns only the key
For efficiency reasons please use ICS_ico_ask_attributes() defined in ics2.h
| classificationObject | (I) |
| attributeName | (I) |
| attributeValue | (OF) |
This function gets the attributes for the given class or view.
Restrictions:
This function cannot be used for groups, as attributes are not defined at group level, but defined at class level. A view defined below a class inherits some or all of these attributes.
| classOrView | (I) Tag of the class or view |
| nAttributes | (O) Number of attributes defined for the given class or view |
| attributeList | (OF) nAttributes Array of attribute tags |
| ICS_API int ICS_ask_attributes_of_classification_obj | ( | tag_t | classificationObject, |
| int * | nAttributes, | ||
| char *** | attributeNames, | ||
| char *** | attributeValues | ||
| ) |
This function gets the name-value pairs of the attributes for the given classification object.
| classificationObject | (I) Classification object tag |
| nAttributes | (O) Number of attributes |
| attributeNames | (OF) nAttributes Attribute names |
| attributeValues | (OF) nAttributes Attribute values |
This function gets the children given the group or class tag.
Restrictions:
This function can be used only for Groups and Classes.
| groupOrClass | (I) Tag of the group or class |
| nChildren | (O) Number of children beneath the group or class |
| children | (OF) nChildren Children tags beneath the given group or class |
| ICS_API int ICS_ask_cid_sid_of_classification_obj | ( | tag_t | classificationObject, |
| char ** | classId, | ||
| char ** | viewId | ||
| ) |
This function gets the class and view Id to which the classification object belongs.
| classificationObject | (I) Classification object tag |
| classId | (OF) |
| viewId | (OF) |
This function gets the class to which the given classification object belongs.
| classificationObject | (I) Classification object tag |
| theClass | (O) Class tag to which the classification object belongs |
| ICS_API int ICS_ask_classification_instance_tag | ( | tag_t | theClass, |
| tag_t | theView, | ||
| char * | classificationObjectId, | ||
| tag_t * | classificationInstance | ||
| ) |
This function gets the classification object tag given the object id, class and view to which it belongs.
| theClass | (I) Class to which the classification object belongs |
| theView | (I) View to which the classification object belongs |
| classificationObjectId | (I) Classification object id |
| classificationInstance | (O) Classification object tag |
For the given workspace object, this function gets the associated classification object if the workspace object is classified.
| wsObject | (I) Workspace object |
| classificationObject | (O) Associated classification object tag if the given workspace object is classified. NULLTAG if not classified |
| ICS_API int ICS_ask_classification_object_id | ( | tag_t | classificationObject, |
| char ** | objectId | ||
| ) |
This function gets the object id given the classification object.
| classificationObject | (I) Classification object tag |
| objectId | (OF) Classification object id |
For the given classification object, this function gets the associated workspace object if the classification object is associated with a workspace object.
| classificationObject | (I) Classification object |
| classifiedWSObject | (O) Associated workspace object tag if an association exists else NULLTAG |
| ICS_API int ICS_ask_id_name | ( | tag_t | groupOrClassOrView, |
| char ** | id, | ||
| char ** | name | ||
| ) |
This function will get the id and name for a given group/class/view.
| groupOrClassOrView | (I) Tag of the group/class/view |
| id | (OF) Id of the given group/class/view |
| name | (OF) Name of the given group/class/view |
For Group / Class / View
| groupOrClassOrView | (I) |
| datasetTag | (O) |
| ICS_API int ICS_ask_instance_count | ( | const char * | ClassOrViewId, |
| int * | nInstances | ||
| ) |
| ClassOrViewId | (I) |
| nInstances | (O) |
This function gets all the classification records from the database (ICO's - Teamcenter Classification Object) under the given class/view combination. Refer to ICS_search_instances() to search for instances satisfying a specific search criteria.
Restrictions:
Since the instances are associated only with the views and the views belong to a specific class, this function can be used only for a particular view/class combination.
| theClass | (I) Tag of the class |
| view | (I) Tag of the view belonging to the given class |
| nInstances | (O) Number of instances found under the class/view combination |
| instances | (OF) nInstances Array of instance tags |
| ICS_API int ICS_ask_instances_by_id | ( | const char * | theIcoId, |
| int * | theCount, | ||
| tag_t ** | theInstanceTags | ||
| ) |
This function returns the ICOs with ID theIcoId.
| theIcoId | (I) |
| theCount | (O) |
| theInstanceTags | (OF) theCount |
| ICS_API int ICS_ask_top_class | ( | tag_t * | topClass | ) |
This function gets the top class of the classification hierarchy.
| topClass | (O) Top class tag |
| ICS_API int ICS_ask_type | ( | tag_t | object, |
| int * | objectType | ||
| ) |
Function to get the type of the object passed. Type can be one of the following:
| ICS_type_group | ICS_type_class | ICS_type_view |
| ICS_type_class_attr | ICS_type_view_attr | ICS_type_unctdict |
| ICS_type_stxt | ICS_type_data | ICS_type_unknown |
| object | (I) Object tag |
| objectType | (O) Object type |
This function gets the view to which the given classification object belongs.
| classificationObject | (I) Classification object tag |
| view | (O) View tag to which the classification object belongs |
| ICS_API int ICS_cancel_ico_by_rtico | ( | tag_t | objTag | ) |
| objTag | (I) Tag of the ics runtimeIco object |
| ICS_API int ICS_classid_is_valid | ( | char * | cid, |
| char * | sid, | ||
| logical * | valid | ||
| ) |
| cid | (I) ClassID |
| sid | (I) SubclassID |
| valid | (O) Flag to indicate the validity |
This function classifies the given workspace object, i.e. it associates the workspace object with the given classification object using the IMAN_classification relation. The classification object should be created using ICS_create_classification_object() prior to using this function. To set the attributes for the classification object, refer to ICS_set_values_for_classification_obj().
| wsObject | (I) Workspace object |
| classificationObject | (I) Classification object |
| ICS_API int ICS_create_class_attributes | ( | tag_t | theClass, |
| int | nAttributes, | ||
| int * | unctNumbers, | ||
| tag_t ** | attributes | ||
| ) |
| theClass | (I) |
| nAttributes | (I) |
| unctNumbers | (I) |
| attributes | (OF) nAttributes |
| ICS_API int ICS_create_classification_object | ( | tag_t | ws_object, |
| const char * | object_id, | ||
| tag_t | view_or_class_tag, | ||
| tag_t * | classification_object | ||
| ) |
This creates a new classification object given the object id, view/class tag, and the workspace object.
If ws_object is not NULLTAG, the ICO will classify this object. In this case the object_id will be ignored, but the Id of the ws_object will be used as the ICO id.
If ws_object is NULLTAG, an ICO will be created with object_id as it's id.
NOTE: If you want to create an ICO for classes which support both unit systems please use ICS_ico_create (ics2.h). This functions creates only metric ICOs.
| ws_object | (I) Workspace object |
| object_id | (I) Id for the classification object |
| view_or_class_tag | (I) View tag or class tag to which the classification object should belong |
| classification_object | (O) Classification object tag |
| ICS_API int ICS_create_unct | ( | int | unctNo, |
| const char * | unctName, | ||
| const char * | shortName, | ||
| const char * | unctUnit, | ||
| int | unctFormat | ||
| ) |
This function creates a new UNCT (attribute). The UNCT number given is an integer that uniquely identifies an attribute in the classification system. An UNCT number once created can be used in any class/view definition subject to the condition that it can be used only once in a particular class/view definition.
| unctNo | (I) UNCT number that uniquely identifies an attribute |
| unctName | (I) Attribute name |
| shortName | (I) Attribute short name |
| unctUnit | (I) Attribute unit |
| unctFormat | (I) Attribute format |
| ICS_API int ICS_create_view | ( | tag_t | theClass, |
| const char * | viewId, | ||
| const char * | viewName, | ||
| tag_t * | newView | ||
| ) |
| theClass | (I) |
| viewId | (I) |
| viewName | (I) |
| newView | (O) |
| ICS_API int ICS_create_view_attributes | ( | tag_t | view, |
| int | nAttributes, | ||
| const char ** | attributeNames, | ||
| tag_t ** | attributes | ||
| ) |
| view | (I) |
| nAttributes | (I) |
| attributeNames | (I) |
| attributes | (OF) nAttributes |
| ICS_API int ICS_delete_classification_object | ( | tag_t | classificationObject | ) |
This function deletes the given classification object from the classification system as long as it is not referenced by other objects. Deletion of the classification object can be done in two ways:
| classificationObject | (I) Classification object |
| ICS_API int ICS_delete_reference_to_ico | ( | tag_t | classificationObject | ) |
This function deletes the reference (identified by the IMAN_classification relation) between the given classification object and the associated workspace object.
It doesn't remove the ICO. Be careful while using this routine, as the ICO doesn't get deleted, and exists as a standalone ICO.
| classificationObject | (I) Classification object |
| ICS_API int ICS_delete_reference_to_wsobject | ( | tag_t | wsObject | ) |
This function deletes the reference (identified by the IMAN_classification relation) between the given workspace object and the associated classification object.
| wsObject | (I) Workspace object |
| ICS_API int ICS_describe_attribute | ( | tag_t | classOrView, |
| tag_t | attribute, | ||
| int * | unctNo, | ||
| int * | format, | ||
| char ** | unit | ||
| ) |
For Classes / Views
| classOrView | (I) |
| attribute | (I) |
| unctNo | (O) |
| format | (O) |
| unit | (OF) |
| ICS_API int ICS_describe_classification_object | ( | tag_t | classificationObject, |
| tag_t * | view, | ||
| int * | nAttributes, | ||
| int ** | unctNumbers, | ||
| int ** | unctFormats, | ||
| char *** | attributeNames, | ||
| char *** | attributeValues, | ||
| char *** | units | ||
| ) |
Function to get the complete details about a classification object.
| classificationObject | (I) Classification object tag |
| view | (O) View tag to which the classification object belongs |
| nAttributes | (O) Number of attributes for the classification object |
| unctNumbers | (OF) nAttributes UNCT numbers of the attributes |
| unctFormats | (OF) nAttributes Formats of the attributes |
| attributeNames | (OF) nAttributes Attribute names |
| attributeValues | (OF) nAttributes Attribute values |
| units | (OF) nAttributes Attribute units |
| ICS_API int ICS_describe_config_field | ( | const char * | configFieldString, |
| int * | multiField, | ||
| logical * | horizontal, | ||
| logical * | vertical, | ||
| logical * | separator, | ||
| logical * | arrow, | ||
| logical * | button, | ||
| logical * | wide, | ||
| logical * | mandatoryFlag, | ||
| logical * | protectedFlag, | ||
| logical * | uniqueFlag | ||
| ) |
| configFieldString | (I) |
| multiField | (O) |
| horizontal | (O) |
| vertical | (O) |
| separator | (O) |
| arrow | (O) |
| button | (O) |
| wide | (O) |
| mandatoryFlag | (O) |
| protectedFlag | (O) |
| uniqueFlag | (O) |
| ICS_API int ICS_describe_format | ( | int | format, |
| int * | formatType, | ||
| int * | modifier1, | ||
| int * | modifier2, | ||
| int * | length | ||
| ) |
A format defines the type of value that is stored for the attribute. This function gets the type of format, modifiers, and the overall length of the formatted value.
The first digit of a positive format number defines what types of values are expected in the field and controls the format of the value. The format number can be up to five digits in length.
The following figure explains the meaning of the digit in the format number:
------------------—
| 1 | 2 | 3 | 4 | 5 |
------------------—
For example: If the format passed is 20509, this function returns:
formatType - 2
modifier1 - 0
modifier2 - 5
length - 09
Restrictions: This function can only be used on positive formats (> 0). If a negative format is passed, this function returns -1 for all output parameters. A negative format indicates an attribute with a pop-up list of values.
| format | (I) Format |
| formatType | (O) An integer that identifies the type (i.e. integer/real/string/date) |
| modifier1 | (O) |
| modifier2 | (O) |
| length | (O) Length |
| ICS_API int ICS_describe_unct | ( | int | unctNo, |
| char ** | unctName, | ||
| char ** | shortName, | ||
| char ** | unctUnit, | ||
| int * | unctFormat | ||
| ) |
This function gets the UNCT definition given the UNCT number.
| unctNo | (I) UNCT number that uniquely identifies an attribute |
| unctName | (OF) Attribute name |
| shortName | (OF) Attribute short name |
| unctUnit | (OF) Attribute unit |
| unctFormat | (O) Attribute format |
| ICS_API int ICS_describe_view | ( | tag_t | view, |
| int * | nAttributes, | ||
| int ** | theAttrIDs, | ||
| int ** | theAttrFormats, | ||
| char *** | theAttrAnnotations, | ||
| char *** | theAttrNames, | ||
| char *** | theAttrShortNames, | ||
| char *** | theAttrUnits, | ||
| char *** | theUserData1, | ||
| char *** | configField, | ||
| char *** | theUserData2, | ||
| int ** | theFlags | ||
| ) |
Returns the definition of a view given the view tag.
Restrictions:
This function can only be used with views.
| view | (I) Tag of the view |
| nAttributes | (O) Number of attributes defined for the given view |
| theAttrIDs | (OF) nAttributes IDs of the attributes |
| theAttrFormats | (OF) nAttributes Formats of the attributes |
| theAttrAnnotations | (OF) nAttributes Annotations of the attributes |
| theAttrNames | (OF) nAttributes Names of the attributes |
| theAttrShortNames | (OF) nAttributes Short names of the attributes |
| theAttrUnits | (OF) nAttributes Units of the attributes (NULL if no unit is defined for the attribute) |
| theUserData1 | (OF) nAttributes the user data 1 property of the attributes |
| configField | (OF) nAttributes |
| theUserData2 | (OF) nAttributes the user data 2 property of the attributes |
| theFlags | (OF) nAttributes the flags of the attributes |
| ICS_API int ICS_exit_module | ( | ) |
This function must be called immediately after all ICS activity is complete.
| ICS_API int ICS_find_class | ( | const char * | groupOrClassId, |
| tag_t * | groupOrClass | ||
| ) |
Function to get the tag of the Group/Class identified by the given ID string.
Restrictions:
This function can be used only for Groups and Classes.
Note: this function returns SML_ERR_NO_INSTANCE_FOUND if the class does not exist
| groupOrClassId | (I) Id of the Group or the Class. |
| groupOrClass | (O) Tag of the passed Group or Class. |
This function will get the tag of the view given the view ID and class tag.
Note: this function returns SML_ERR_NO_INSTANCE_FOUND if the class does not exist
| theClass | (I) Tag of the class |
| viewId | (I) View id |
| view | (O) Tag of the view |
| ICS_API int ICS_format_value | ( | int | howToFormat, |
| int | theFormat, | ||
| const char * | theMinValue, | ||
| const char * | theMaxValue, | ||
| const char * | theValue, | ||
| char ** | theFormattedValue | ||
| ) |
This function returns the formatted value for the given format.
| howToFormat | (I) Possible values for howToFormat are:
|
| theFormat | (I) |
| theMinValue | (I) |
| theMaxValue | (I) |
| theValue | (I) |
| theFormattedValue | (OF) |
| ICS_API int ICS_get_popup_definition | ( | int | format, |
| int * | count, | ||
| char *** | optionIds, | ||
| char *** | optionValues | ||
| ) |
This function gets the pop-up definition for a negative format. A negative format indicates an attribute with pop-up list of values. A pop-up list of values can be associated with an attribute such that when a user clicks the down arrow in the attribute field, a list of legal values for that attribute is displayed. Pop-up lists are used when an attribute has a finite set of legal values. The pop-up list is more efficient than manual entry because it eliminates the need for the user to memorize the legal values. Pop-up lists also enforce consistency. Each of the values in the pop-up list is identified by a keyword (optionId) and a value (optionValue).
Refer to Teamcenter Classification Administration Help for additional information on formats.
Restrictions:
This function can only be used on negative formats (< 0), as pop-up list of values are associated only with negative formats.
| format | (I) Format |
| count | (O) Count of the list of values for this format |
| optionIds | (OF) count Keywords for each of the pop-up list of values |
| optionValues | (OF) count Values for each of the pop-up list of values |
| ICS_API int ICS_init_hooks | ( | ) |
| ICS_API int ICS_init_module | ( | ) |
| obj | (I) |
| is_an_ics_rt_obj | (O) |
| wsObject | (I) |
| isClassifiable | (O) |
This function checks whether the given workspace object has been classified or not.
| wsObject | (I) Workspace object |
| isClassified | (O) True if classified, False if not |
| ICS_API int ICS_receive_obj_created_from_nxmgr | ( | tag_t | item_tag, |
| tag_t | itemrev_tag, | ||
| tag_t | dataset_tag, | ||
| int | creation_type | ||
| ) |
This function receives the new Workspace object, an Item/ItemRev/Dataset, created from the UG/Manager, it fires a component creation event to notify the Teamcenter Portal.
| item_tag | (I) The tag to the newly created Item or the original Item. |
| itemrev_tag | (I) The tag to the newly created ItemRev object or the ItemRev object where the newly created dataset is attached.. |
| dataset_tag | (I) The tag to the newly created dataset object or the dataset object attached under the newly created Item or ItemRev. |
| creation_type | (I) The integer flag indicating what type of object is created, 1 means a new Item is created, 2 means a new ItemRev is created, 3 means a new dataset is created. |
| ICS_API int ICS_remove_classification | ( | tag_t | wsObject | ) |
This function removes the relation (IMAN_classification relation) between the given workspace object and the associated classification object. The classification object also gets deleted. Once the classification object has been deleted, there is no way to retrieve it.
If you don't want the ICO to be deleted, take a look at ICS_delete_reference_to_ico().
Refer to ICS_delete_reference_to_wsobject() to delete only the relation between the workspace object and the classification object.
| wsObject | (I) Workspace object |
| ICS_API int ICS_resolve_attribute_id | ( | tag_t | wso, |
| int | attr_id, | ||
| int | vla_pos, | ||
| tag_t * | prop_tag, | ||
| tag_t * | type_tag | ||
| ) |
Retrieve Teamcenter property and type tag for Classification runtime attribute.
| wso | (I) workspace object |
| attr_id | (I) Classification attribute ID |
| vla_pos | (I) Classification attribute VLA position |
| prop_tag | (O) Tc property |
| type_tag | (O) Tc type |
Retrieve Teamcenter property and type tag for classified object.
| wso | (I) workspace object |
| ico_index | (I) Classification ico index |
| prop_tag | (O) Tc property |
| type_tag | (O) Tc type |
| ICS_API int ICS_save_ico_by_rtico | ( | tag_t | attrSyncTag | ) |
| attrSyncTag | (I) Tag of the ico runtime ico |
| ICS_API int ICS_search_instances | ( | tag_t | theClass, |
| tag_t | view, | ||
| int | nAttributes, | ||
| int * | attributeUncts, | ||
| char ** | queries, | ||
| int * | nInstances, | ||
| tag_t ** | instances | ||
| ) |
This function searches for the classification records in the database for the given class/view combination and satisfying the given search criteria (queries). If the queries passed are null, this function behaves similar to ICS_ask_instances().
Restrictions:
Since the instances are associated only with the views and the views belong to a specific class, this function can be used only for a particular view/class view combination.
| theClass | (I) Tag of the class |
| view | (I) Tag of the view belonging to the given class |
| nAttributes | (I) Number of attributes defined in the view |
| attributeUncts | (I) UNCT's of the attributes defined in the view |
| queries | (I) Search criteria (commonly used are >, >=, <, <=) |
| nInstances | (O) Number of instances satisfying the search criteria and belonging to the given class/view combination |
| instances | (OF) nInstances Array of instance tags found |
| ICS_API int ICS_search_object_ids | ( | tag_t | theClass, |
| tag_t | view, | ||
| char * | query, | ||
| int * | nInstances, | ||
| tag_t ** | instances | ||
| ) |
Object Id refers to the unique id associated with a classification record (ICO) in the Classification System. This function searches for the classification records in the database based on the given query and belonging to the given class/view combination.
Restrictions:
Since the instances are associated only with the views and the views belong to a specific class, this function can be used only for a particular view/class view combination.
| theClass | (I) Tag of the class |
| view | (I) Tag of the view belonging to the given class |
| query | (I) Query |
| nInstances | (O) Number of instances satisfying the search criteria and belonging to the given class/view combination |
| instances | (OF) nInstances Array of instance tags found |
| ICS_API int ICS_set_values_for_classification_obj | ( | tag_t | classificationObject, |
| int | nAttributes, | ||
| const char ** | attributeNames, | ||
| const char ** | attributeValues | ||
| ) |
For ICO's
| classificationObject | (I) |
| nAttributes | (I) |
| attributeNames | (I) |
| attributeValues | (I) |
| ICS_API int ICS_share_pending | ( | int | theSitesCount, |
| const char ** | theSites, | ||
| int | theverbosity | ||
| ) |
| ICS_API int ICS_xml_ask_children | ( | const char * | theParentId, |
| int | theLevelCount, | ||
| logical | theAdminMode, | ||
| int | theSortOption, | ||
| logical | theXMLOption, | ||
| char ** | theChildren | ||
| ) |
This function returns the children of the given class in form of an XML element or document
| theParentId | (I) |
| theLevelCount | (I) |
| theAdminMode | (I) |
| theSortOption | (I) |
| theXMLOption | (I) |
| theChildren | (OF) |
| ICS_API int ICS_xml_export | ( | const char * | theXMLFileName, |
| ICS_objectType_t | nObjType, | ||
| const char * | theId, | ||
| int | theObjectTypeFilter, | ||
| int | theExportOptions | ||
| ) |
This function get the Teamcenter in-CLASS objects and export the in-CLASS objects definition data to the XML file in the specified physical location
| theXMLFileName | (I) The XML File to be generated |
| nObjType | (I) Type of the given Object |
| theId | (I) ID of the given object |
| theObjectTypeFilter | (I) Integer representing the combination of the types of objects for export Possible values for "theObjectTypeFilter" are: ICS_ObjectType_keylov | ICS_ObjectType_attribute | ICS_ObjectType_class | ICS_ObjectType_view | ICS_ObjectType_instance ICS_ObjectType_userclass ICS_ObjectType_all |
| theExportOptions | (I)Integer representing export Options. Currently this is applicable only to 'Class' objects in "theObjectTypeFilter". When export functions are called for an object of type class, these options can be given in the Export-Options parameter. If necessary, these options can be combined using '|' (bitwise OR) operator. Possible values for "theExportOptions" are: ICS_xmlexport_this ICS_xmlexport_parent ICS_xmlexport_parentview ICS_xmlexport_subclass ICS_xmlexport_subclassview ICS_xmlexport_Hierarchy ICS_xmlexport_parentinstance ICS_xmlexport_subclassinstance ICS_xmlexport_instancexml ICS_xmlexport_instanceschema |
| ICS_API int ICS_xml_import | ( | const char * | theXMLFileName, |
| int | theObjectTypeFilter, | ||
| logical | theUpdateFlag, | ||
| logical | theRelatedCreationFlag | ||
| ) |
This function imports the Classification data from a specific XML file into Teamcenter. The XML file should contain the Classification data in a format that complies with the Classification XML schema definition file, in-class.xsd, located in the TC_DATA directory.
Restrictions:
This method will validate the given XML file against the in-class.xsd schema file, and fails if the content of the XML file is invalid.
| theXMLFileName | (I) The file path of the XML file |
| theObjectTypeFilter | (I) Integer that specifies the object types to be considered for the import. This could be the combination of one or more types defined in the enum ICS_objectType_t. It could also be ICS_ObjectType_all to import any type of object |
| theUpdateFlag | (I) Flag that enables the import to update existing objects. If TRUE, the method will try to update the object if it already exists. If FALSE, it will ignore importing any data for the existing objects |
| theRelatedCreationFlag | (I) Allows the function to create related Teamcenter objects for the imported Classification objects |
| ICS_API int ICS_xml_register_hook | ( | ICS_xml_hook_id_t | theHookId, |
| ICS_xml_hook_t | theHook | ||
| ) |
This function registers the given hook function for the subsequent calls to ICS_xml_import / ICS_xml_export functions. This given function theHookFn will be registered for the specified operation theHookId. The registered hook functions are called before and after the specified operation.
This function can be used to register separate hook functions for each of the operations mentioned in ICS_xml_hook_id_t.
If the value for theHookFn is NULL, then this function will reset and clear the previously registered hook function for the given theHookId event.
Always returns ITK_ok
| theHookId | (I) The specific event for which the hook function is registered |
| theHook | (I) The user-defined function that is to be registered as the hook function |