Explanation of ITK Login Program














In the very first post, I wrote simple Teamcenter login program. Following is the step-wise description of Teamcenterlogin program.

All ITK programs must include tc/tc.h. It has the prototype for ITK_init_module and the definition of many standard datatypes, constants, and functions that almost every ITK program requires, such as tag_t and ITK_ok.

Normal Execution of c\c++ program requires main() in same way ITK has ITK_User_main(int argc,char* argv[]) function from which main program gets executed.

ITK_ok gives the return value of ITK functions .it is an integer value .If value return 0 means code runs successfully .and if value return other than 0 means code get failed.
For login into Teamcenter we have two functions

  •  ITK_auto_login()
    • Description: If the value of ITK_auto_login is set to true, the user does not need to enter in a user name, password, or group in the command line. Auto logon uses operating system user names and passwords to log on to Teamcenter. However, if the user wants to use a login name other than their operating system name, they may use the command line format.
    • Values : TRUE Enables automatic logon. FALSE Suppresses automatic logon.
  • ITK_init_module( userName, password, group);
    • If your program is called without the ITK_auto_login function, supply the arguments for user, password and group.

If program fails to login then it returns non -zero value of ITK_ok

                         Memory management in Teamcenter

Data types in ITK programming

Teamcenter ITK Programming uses same data types that are there in C\C++ languages.

Example:-  int ,char*, enum ,struct etc

The new APIs use the char* type instead of fixed char array i.e char filesize[50] size in the input and output parameters. The new APIs use dynamic buffering to
replace the fixed-size buffering method.fixed-size array got deprecated from TC 10.1 onwards.

Special data types


tag_t is special data type where All objects in the ITK are identified by tags of C type tag_t. It is a unique identifier of a reference (typed, untyped, or external )

–An unset tag_t variable is assigned the NULLTAG for null value

Tags may be compared by use of the C language == and != operators. An unset tag_t
variable is assigned the NULLTAG null value

Example :-  tag_t itemTag

if(itemTag==NULLTAG)  or if(itemTag!=NULLTAG)

                                           Creation of DLL in ITK

Teamcenter also comes with a set of include files that are similar with C include files.

For example, instead of using:
#include “string.h”

You could use:
#include <fclasses/tc_string.h>

fclasses/tc_stddef.h  etc

These include files are used in Teamcenter to insulate it from the operating system.


We will more post on PLM TUTORIAL–>Teamcenter Customization in upcoming days.

Kindly provide your valuable comment on below Comment section and also have you any question kindly ask to ASK QUESTION in FORUM. Our Team will try to provide the best workaround.


3 thoughts on “Explanation of ITK Login Program”

  1. We can add how to use Encryption using auto login where password which has been to utility will be encrypted.

Leave a Reply

Your email address will not be published. Required fields are marked *