|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
char part_fspec[MAX_FSPEC_SIZE+1]="";
char title[] = "\nPart %s\n";
int curr_part,num_parts;
int feature_type,solid_type;
int count_l;
int count_feature[100];
int count_solid[100];
tag_t obj_p;
// tag_t obj_f[10];
tag_t feature;
tag_t feature_save[100];
tag_t solid_save[100];
char num_of_part_c[100];
char num_of_curr_part_c[100];
char num_of_curr_feature_c[100];
char layer_of_curr_obj_c[100];
// char num_of_exps_c[100];
UF_OBJ_disp_props_t feature_disp_props;
UF_OBJ_disp_props_t solid_disp_props;
tag_t *exps;
int number_of_exps=0,i,j;//与当前特征有关的表达式数量
//获取当前会话中part的数量
num_parts = UF_PART_ask_num_parts();
sprintf(num_of_part_c,"PART文件数量 %d\n",num_parts);
UF_UI_open_listing_window();
UF_UI_write_listing_window(num_of_part_c);
for (curr_part=0;curr_part < num_parts;curr_part++)
{
//获取当前会话中当前部件的标识
obj_p = UF_PART_ask_nth_part(curr_part);
//获得当前部件的名称
UF_PART_ask_part_name(obj_p,part_fspec);
sprintf(num_of_curr_part_c,"PART顺序号:%d\nPART名称为:%s\n",curr_part,part_fspec);
UF_UI_write_listing_window(num_of_curr_part_c);
count_l = 0;
feature_type = UF_feature_type;
feature = NULL_TAG;
//开始遍历当前部件中的特征/对象。遍历过程的起点是NULL_TAG
feature_save[0] = feature;
//遍历终点是NULL_TAG
do
{
count_l++;
UF_OBJ_cycle_objs_in_part(obj_p,feature_type,&feature);
solid_save[count_l] = feature;
//查询对象属性
int result = UF_OBJ_ask_display_properties(feature,&feature_disp_props);
if(result) UF_UI_write_listing_window("fail");
sprintf(layer_of_curr_obj_c,"特征所在层:%d\n",feature_disp_props.layer);
UF_UI_write_listing_window(layer_of_curr_obj_c);
}while (feature != NULL_TAG);
count_feature[curr_part] = count_l;
sprintf(num_of_curr_feature_c,"特征数量:%d\n",count_l);
UF_UI_write_listing_window(num_of_curr_feature_c);
} |
|