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);
} |