Cancel
Showing results for 
Search instead for 
Did you mean: 

creation of a new change using ITK in new change module for TC 11.2.3

Experimenter
Experimenter

Hello my friends,

 

We are trying to create a new change item using ITK functions but we faced a problem we can not create a new change.

When we try to create, we only create old change items(classic change module, EngChange). We have only this option on ITK libraries. We are using ECM_create_ec_item with ECM_set_ec_type. Is there any way to create a new change item(change notice)?

 

Thanks in advance.

2 REPLIES

Re: creation of a new change using ITK in new change module for TC 11.2.3

Phenom
Phenom

Good afternoon, I myself have not tried to create ChangeNotice using ITK, but try the function TCTYPE_create_object

Example code for Item (try changing to ChangeNotice):

 

tag_t item_type_tag = NULLTAG;
tag_t itemRev_type_tag = NULLTAG;
tag_t item_create_input_tag = NULLTAG;
tag_t itemRev_create_input_tag = NULLTAG;
tag_t item_tag = NULLTAG;
tag_t itemRev_tag = NULLTAG;

char* next_id = NULL;

const char *object_name[] = { "TestItemName" };
const char *object_desc[] = { "TestItem Description" };


TCTYPE_find_type("Item",  "Item", &item_type_tag);
TCTYPE_find_type("ItemRevision","ItemRevision", &itemRev_type_tag);

TCTYPE_construct_create_input (item_type_tag, &item_create_input_tag);
TCTYPE_set_create_display_value(item_create_input_tag, "object_name", 1, object_name);
TCTYPE_set_create_display_value(item_create_input_tag, "object_desc", 1, object_desc);

TCTYPE_create_object(item_create_input_tag, &item_tag );
ITEM_save_item(item_tag);

TCTYPE_construct_create_input(itemRev_type_tag,&itemRev_create_input_tag);
 
TCTYPE_set_create_display_value(itemRev_create_input_tag, "object_name", 1, object_name);

AOM_set_value_tag(itemRev_create_input_tag, "items_tag", item_tag);

TCTYPE_create_object(itemRev_create_input_tag, &itemRev_tag);
ITEM_save_rev(itemRev_tag);

ITEM_save_item(item_tag);

 

Source: http://mrblaugger.blogspot.ru/2016/02/basic-itkteamcenter-programs.html

Re: creation of a new change using ITK in new change module for TC 11.2.3

Experimenter
Experimenter

Hello,

 

I am trying it but doesnt work. I had a look at those functions and library but I think it is not what I want.

 

Thank you.