标题: 大家帮看我程序哪里错了 [打印本页] 作者: rafaleb01 时间: 2008-3-30 10:53 标题: 大家帮看我程序哪里错了 在打开的零件上生成截面线,现在平面生成了 但截面线不出来 斑竹能帮我看看哪个地方不对吗?
void ufusr(char *param, int *retcode, int param_len)
{
if (!UF_CALL(UF_initialize()))
{
char part_fspec[MAX_FSPEC_SIZE+1];
int curr_part, num_parts;
int type;
int count_1;
tag_t part;
tag_t feature;
/* Get the total number of loaded parts. */
num_parts = UF_PART_ask_num_parts();
for ( curr_part=0 ; curr_part < num_parts ; curr_part++ )
{
/* Get the part tag for the current part number of the
loaded part and get its part name.
*/
part = UF_PART_ask_nth_part( curr_part );
UF_PART_ask_part_name( part, part_fspec );
printf( title0, part_fspec );
count_1 = 0;
type = UF_feature_type;
feature = NULL_TAG;
/* Start the cycling process by passing in a NULL_TAG. */
UF_OBJ_cycle_objs_in_part( part, type, &feature );
/* Keep cycling until there are no more features to cycle. */
while ( feature != NULL_TAG )
{
count_1++;
UF_OBJ_cycle_objs_in_part( part, type, &feature );
FILE *fp3;
if((fp3=fopen("e:\\my_source\\line4.txt","w"))==NULL)
{
printf("could not open data file.");
exit(0);
}
fprintf(fp3,"UF_OBJ_cycle_objs_in_part shows features is %d \n",&feature);
}
FILE *fp2;
if((fp2=fopen("e:\\my_source\\line3.txt","w"))==NULL)
{
printf("could not open data file.");
exit(0);
}