Here we will come to know the few APIs related to ITEM/UOM
ITEM //Generates a Item ID for a user. USER_new_item_id(NULLTAG,type_tag,&mod,&id); line->item_id = id; ITEM_create_item( line->item_id,line->item_name,line->item_type,NULL,&item,&rev ); ifail = ITEM_save_item( item); ifail = ITEM_create_rev( item, NULL, &rev ); ifail = ITEM_save_rev( rev); ifail = ITEM_ask_name (item, name); ifail = ITEM_set_name (item, line->item_name); //Need to save the item otherwise item name can not set ifail = AOM_save(item); ifail = ITEM_set_rev_name (rev, line->item_rev_name); //Need to save the item rev otherwise item rev name can not set ifail = AOM_save(rev); //This function will get the type of the Item.type ->char array ITEM_ask_type (item, type); //This function will return the tag of a specific Item Revision //If more than one match (case insensitive) is found, an error is returned ITEM_find_revision( item, default_null_to_A(line->item_revision_id), &rev ); //This function searches the database for all Item Revisions (of the given Item) ITEM_find_revisions
Unit of Measure //Units of measure are objects defined for the Teamcenter Engineering site by the system administrator. //By default, Items have no UOM. In this case this function will give NULLTAG. //This implies that quantities of such Items are expressed in terms of "Each" or "Pieces". //In other words they refer to a discrete number of component parts. //In PSE if no specific quantity value is associated with the use of such Items, the default quantity is assumed to be "1 component". //Returns the tag of the UOM with the given symbol. ifail = UOM_find_by_symbol( line->unit_of_measure, &unit_of_measure ); //Sets the unit of measure in which quantities this Item must be expressed. ifail = ITEM_set_unit_of_measure( item, unit_of_measure); //Enquires the unit of measure in which quantities of this Item must be expressed ITEM_ask_unit_of_measure (item, &old_unit_of_measure);
No comments:
Post a Comment