Teamcenter provides various option to customize the out of the box (ootb) behavior. With different business process followed across various industries, customization is always the option to change the behavior of the system. In this blog, we will look into the server side customization using ITK.
In server-side customization, we have 2 methods
Teamcenter Services - Uses standard service-oriented architecture(SOA) to provide the framework.
Integration Toolkit (ITK) - is a Siemens PLM Software tool that is used to integrate third-party or user-developed applications with Teamcenter.
ITK is a low-level API's built by siemens to access the Teamcenter database. It is used for programming within Teamcenter server for customizing extension points, workflow handlers, server exits or standalone executables.
The ITK is a set of C functions used directly by Teamcenter and NX. ITK API allows to write a custom function or method for Teamcenter in C or C++ functions. ITK API are used for extending the existing functionality or to create the new functionality.
To design a successful customization, understanding of Teamcenter datamodel is needed. Basic understanding of below concepts can help you design a better customization solution.
what are business objects vs classes
property vs attribute
type of properties
hierarchy of business objects
Refer to Teamceter datamodel blogs for additional information on the above topics.
Siemens provided ITK reference guide contains all ITK API. Reference information about ITK APIs can be found in the Integration Toolkit Function Reference. For each Teamcenter version, siemens provides a ITK function reference. ITK function reference link are specific to Teamcenter major version. Developers should refer to ITK reference for the Teamcenter version they are building the function for. This is because there is possibility of ITK API's getting deprecated and being replaced with new ITK API with different input parameters.
Reference link for ITK Function Reference Teamcenter 12.3
ITK API Format:
All ITK functions have a standard format that attempts to give the most information possible in a small space. All prototypes are located in include files named classname.h for the class of objects that the functions operate on. Additional information about specific ITK API can be found in Integration Toolkit function reference.
int module_verb_class_modifier ( const type variable-name[dimension] /* [I/O/OF] */ );
All ITK functions return an integer error code. This number determines whether the function is executed successfully or not. This numeric code is called error code and to get the error string from it, the code has to be passed to EMH_ask_error_text function.
This is the module designator. Teamcenter classes are grouped together in modules. For example, all dataset related classes like Dataset, DatasetType, Tool, and RevisionAnchor classes are all handled by the AE module.
Commonly used Teamcenter Module and its Keyword:
AE -> Application Encapsulation (dataset)
SA -> System Administrator (Organization)
AOM -> Application Object Module (To set property)
CRF -> Reports
GRM -> Relation
RES -> Reservation(Check out)
POM -> Persistent Object Manager (Pom Queries and POM level ITK calls)
TCType ->Teamcenter Types (Create new item, form)
BOM->Bill of Material
PS ->Product Structure (BOM)
PROP ->Properties (To get Property type , to get real and display name)
CFM->Configuration manager(Revision Rule)
This is the first key word describing an action to be taken on an object or set of objects. Common actions are create, add, remove, copy, set, and ask.
This is the class name or an abbreviation of the class name. The exceptions are for modules that only deal with one class, like Workspace or modules that deal with many classes, like WSOM and POM.
This is a word or several words that give more description of how the action of the verb applies to the class.
Input pointer variables which are not meant to be modified normally are declared with a const to ensure that they are not accidentally modified.
This is the data type of the argument (for example, int, tag_t*, or char***).
These characters indicate whether the particular argument is input, output or output-free. Output-free(OF) means that the function allocates space for the returned data and this space should be freed with the MEM_free function.
Reading ITK API with Examples
WSOM_ask_name2 API is to retrieve the name of the workspace object and its subtypes. Subtypes includes dataset, item, item revision, forms, etc. Using this api we can get the name of any type of workspace objects and its sub classes.
Set up BMIDE project for coding
Refer to Setting up BMIDE for Coding blog.