iCAx开思工具箱
标题:
如何在组件中遍历出实体
[打印本页]
作者:
haidong2008
时间:
2009-12-28 20:00
标题:
如何在组件中遍历出实体
请问版主:
如何在组件中遍历出实体?先谢谢了!
作者:
LIUCHANGLIN
时间:
2010-5-25 21:32
UF_UI_write_listing_window(buffer); }
}
return(irc);
}
static void cycle_all_part(tag_t parent_part_occ)
{
int i,part_num;
tag_t *child_part_occ;
char inst_name[31];
char part_name[33], refset_name[31];
double origin[3], mtx[9],transform[4][4];
char name[100];
part_num = UF_ASSEM_ask_part_occ_children(parent_part_occ,&child_part_occ);
UF_UI_open_listing_window();
/* for (i=0;i<part_num;i++)
{
UF_ASSEM_ask_component_data(child_part_occ[i],part_name,refset_name,
inst_name,origin,mtx,transform);
cycle_all_part(child_part_occ[i]);
sprintf(part_name, " part_name is %d\n", part_name);
UF_UI_write_listing_window(part_name);
// UF_UI_write_listing_window(inst_name);
}*/
for (i=0; i<part_num; i++)
{
UF_OBJ_ask_name(child_part_occ[i],name);
uc1601(name,1);
}
UF_free(child_part_occ);
}
extern void ASSEM_cycle_all_part(void)
{
int i,part_num;
tag_t *child_part_occ;
char inst_name[31];
char part_name[33],refset_name[31];
double origin[3],mtx[9],transform[4][4];
tag_t root_part,root_part_occ;
root_part=UF_PART_ask_display_part();
root_part_occ=UF_ASSEM_ask_root_part_occ(root_part);
part_num=UF_ASSEM_ask_part_occ_children(root_part_occ,&child_part_occ);
for (i=0; i<part_num; i++)
{
UF_ASSEM_ask_component_data(child_part_occ[i],part_name,refset_name,
inst_name,origin,mtx,transform);
cycle_all_part(child_part_occ[i]);
}
UF_free(child_part_occ);
}
void ufusr( char *param, int *retcode, int paramLen)//匡拒ufusr() User Exit
{
if (!UF_initialize())
{
ASSEM_cycle_all_part();
UF_terminate();
}
}
int ufusr_ask_unload( void )
{
return (UF_UNLOAD_IMMEDIATELY);
}
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3