Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

a problem of part family template

jiang

New member
I try to add a number to a part family template and update the part to display it,but there is something wrong with the programe.it only open the template part but can not update the template and display it,if any one get the reasons please tell me, thanks a lot!



char
family_name[255]="E:\\part_family\\004.prt",
instance[MAX_FSPEC_SIZE+1],
part_number[UF_UGMGR_PARTNO_SIZE+1],
**values,
*info;
logical saved,
force_update;
tag_t
part,
part_tag,
family_tag,
part_inst,
family_inst,
*part_list,
instance_part;
int
i,
family_count,
instance_count,
*error_list;
UF_FAM_member_data_t
new_data;
UF_PART_load_status_terror_status ;
UF_PART_new("e:\\xiaojie.prt",1,&part);
UF_PART_open_quiet(family_name,&part_tag,&error_stat us);
UF_PART_ask_families(part_tag, &family_count, &family_tag);

new_data.value_count = 4;
allocate_string_array(4, MAX_FSPEC_SIZE+1, &values);
new_data.values = values;
values[0]="001";
values[1]="001";
values[2]="11";
values[3]="22";
UF_FAM_add_member(family_tag, &new_data, &family_count);
UF_MODL_update();
//
UF_PART_create_family_instance(family_tag, family_count,
&part_inst,&family_inst);
UF_PART_update_family_instance(family_tag,family_count,force _update,
&instance_part,saved,&instance_count,&am p;part_list,error_list,info);
UF_PART_ask_part_name(part_inst,instance);
part_tag=UF_PART_ask_part_tag(instance);
UF_PART_set_display_part(part_tag);
UF_free(part_list);
UF_free(error_list);
UF_free(info);
 

Sponsor

Articles From 3DCAD World

Back
Top