C語言關(guān)聯(lián)TC中BOMWindow與BOPWindow
/*
* 關(guān)聯(lián)BOMWindow與BOPWindow
*/
int associate_window(tag_t bom_top_revision_tag,tag_t bop_top_revision_tag,tag_t bom_window_rule_tag,tag_t bop_window_rule_tag)
{
int rcode=ITK_ok;
//1、open BOM Window
tag_t bom_window_tag=NULLTAG;
tag_t bom_topline_tag=NULLTAG;
ITKCALL(rcode=BOM_create_window(&bom_window_tag));
ITKCALL(rcode=BOM_set_window_config_rule(bom_window_tag,bom_window_rule_tag));
ITKCALL(rcode=BOM_set_window_top_line(bom_window_tag,NULLTAG,bom_top_revision_tag,NULLTAG,&bom_topline_tag));
//ITKCALL(rcode=BOM_window_show_unconfigured(bom_window_tag));
//ITKCALL(rcode=BOM_window_show_variants(bom_window_tag));
ITKCALL(rcode=BOM_save_window(bom_window_tag));
//2、open BOP Window
tag_t bop_window_tag=NULLTAG;
tag_t bop_topline_tag=NULLTAG;
ITKCALL(rcode=ME_create_bop_window(&bom_window_tag));
ITKCALL(rcode=BOM_set_window_top_line(bop_window_tag,NULLTAG,bop_top_revision_tag,NULLTAG,&bop_topline_tag));
ITKCALL(rcode=BOM_set_window_config_rule(bop_window_tag,bop_window_rule_tag));
ITKCALL(rcode=BOM_save_window(bop_window_tag));
//3、Associate BOM Window and BOP Window
ITKCALL(rcode=ME_bop_window_add_ref_window(bop_window_tag,bom_window_tag,"BOMWindow"));
return rcode;
}