Saturday 24 December 2016

Teamcenter ITK : Understanding Folder / GRM Relation APIs


FOLDER APIS

//Create Folder

 FL_create( aDvoFdrName, aDvoFdrDesc, &tDvoFolder );
//Save created folder
AOM_save( tDvoFolder );

//Insert Folder

//Locks an object against modification by another process.
//So that I can modify it
AOM_lock( tWSOM_Find[0] );//Folder under which we will insert the folder

FL_insert(tWSOM_Find[0],tDvoFolder,999);//at last insert tDvoFolder folder    

AOM_save( tWSOM_Find[0] );
AOM_unlock( tWSOM_Find[0]);
printf("\nNew DVO Folder Created Under Passed Folder\n");

// Insert Item in Newstuff Folder

ITEM_find_item( line->item_id, &item );//Deprecated
FL_user_update_newstuff_folder( item );//This function inserts the specified workspaceobject_tag into the current user's 
Newstuff folder.

GRM Relation APIS

//How to Find GRM Relation related objects

//Find the Object of IMAN_specification relation
GRM_find_relation_type  ("IMAN_specification",&tRelationFind);

//Get the Secondary objects related by IMAN_specification relation
GRM_list_secondary_objects_only (tReqRevTag,tRelationFind,&ReqRevRelCnt,&Secondary_Objects);
printf("\nTotal Secondary Objects Attached With Requirement Revision with IMAN_specification Relation => [%d]\n",ReqRevRelCnt);

//How to Create GRM Relation

GRM_find_relation_type  ("IMAN_reference",&tRelationFind1);
GRM_create_relation(tDvoItemRev,tReqRevTag,tRelationFind1,NULLTAG,&tRelationObj1);
GRM_save_relation  (tRelationObj1);

2 comments:

  1. How to insert item in Home folder by using ITK like "Insert Item in Newstuff folder"

    ReplyDelete
  2. I used GRM create Relation for Primary and Secondary Object for a particular relation name but it is pulling item revision master form as well

    Can someone tell why it is adding master form as well

    ReplyDelete