遍历组件集下的组件
需要注意的是,组件集创建是在部件下的组件集,而不是会话中的组件集.
// TODO: add your code here
int
dev,
num_char;
tag_t
comp_tag = NULL_TAG,
cset_tag = NULL_TAG;
char
list_header[132],
cset_name[] = "cset";
logical
is_mem;
const tag_t part_tag = UF_PART_ask_display_part();
uc1600("Please enter cset name to process", cset_name, &num_char);
(uc5203)(&cset_tag, cset_name, strlen(cset_name));//UF_OBJ_cycle_by_name
uc4400(0, "", 0);//UF_UI_open_listing_window
FTN(uf4401)(&dev);//UF_UI_open_listing_window
strcpy(list_header, " Members of component set : ");
strcat(list_header, cset_name);
uc4403(list_header);//UF_UI_write_listing_window
int ii = 0;
while (!UF_CALL(UF_OBJ_cycle_objs_in_part(part_tag, UF_component_type,
&comp_tag)) && (comp_tag != NULL_TAG))
{
UF_CALL(UF_ASSEM_is_member_of_cset(cset_tag, comp_tag, &is_mem));
if (is_mem)
{
tag_t mem_tag[1000];
char obj_name[30];
mem_tag[ii] = comp_tag;
uc5027(comp_tag, obj_name, &num_char);
uc4403(obj_name);
ii++;
}
}
评论区