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"UF_MODL_ask_exps_of_feature"

jiang

New member
i would like to get the expressions of the feature that got using "UF_UI_select_feature()",but it can not show the exptessions that i want to get,even the dialog of display the expressions is can not be shown,what is the reason,i need your help


char cue[] = "cue message";
int cnt=0, resp=0;
tag_t *feats;
char *feat_type;
FILE *fp=NULL;
char *string;
tag_t *exps;
int number_of_exps=0,i;
char buf[UF_UI_MAX_STRING_LEN+1];
char err_msg[MAX_LINE_SIZE+1];
char *expr_str;
char str[100];

fp=fopen("E:\\test.txt","w");
UF_CALL(UF_UI_select_feature(cue, NULL, &cnt, &feats, &resp));
UF_MODL_ask_feat_type(feats,&feat_type);
fprintf(fp,"\nfeature
 
Hello Jiang,


You can try this code to display the expressions of the model for which you are looking.


/* Standard header files */
#include <stdlib.h>
#include <stdio.h>
#include <time.h>


/* UFUN header files */
#include <uf.h>
#include <uf_ui.h>
#include <uf_obj.h>
#include <uf_object_types.h>
#include <uf_part.h>
#include <uf_defs.h>
#include <uf_attr.h>
#include <uf_cfi.h>
#include <uf_modl.h>


/* Program header file */
#include <ufx_cycle.h>


extern void ufusr( char *param, int *retcod, int param_len )
{


char cue[] = "cue message";
int cnt=0, resp=0;
tag_t *feats;
char *feat_type;
FILE *fp=NULL;
char *string;
tag_t *exps;
int number_of_exps,i;
char buf[UF_UI_MAX_STRING_LEN+1];
char err_msg[MAX_LINE_SIZE+1];
char *expr_str;
char str[100];



UF_initialize();
//fp=fopen("E:\\test.txt","w");
UF_UI_select_feature(cue, NULL, &cnt, &feats, &resp);
UF_MODL_ask_feat_type(feats[0],&feat_type);
//fprintf(fp,"\nfeature
 
extern void ufusr( char *param, int *retcod, int param_len )
{


char cue[] = "cue message";
int cnt=0, resp=0;
tag_t *feats;
char *feat_type;
FILE *fp=NULL;
char *string;
tag_t *exps;
int number_of_exps,i;
char buf[UF_UI_MAX_STRING_LEN+1];
char err_msg[MAX_LINE_SIZE+1];
char *expr_str;
char str[100];



UF_initialize();
//fp=fopen("E:\\test.txt","w");
UF_UI_select_feature(cue, NULL, &cnt, &feats, &resp);
UF_MODL_ask_feat_type(feats[0],&feat_type);
//fprintf(fp,"\nfeature
 
hello kishorev:


Thanks for your help,i have found the reason for the problem,


UF_CALL(UF_UI_select_feature(cue, NULL, &cnt, &feats, &resp));
if (cnt)
{
first = feats[0];
UF_free(feats);
}


it works.


With regards,


jiangbin
 

Sponsor

Articles From 3DCAD World

Back
Top