iCAx开思工具箱

标题: 【求助】各位高手看看下面的代码有什么问题? [打印本页]

作者: tari    时间: 2004-6-10 14:24
标题: 【求助】各位高手看看下面的代码有什么问题?
        char message[133];
      message[0]='\0';
      strcpy(message,"please select face");
      char title[133];
      title[0]='\0';
      strcpy(title,message);
      int scope=UF_UI_SEL_SCOPE_WORK_PART;
      UF_UI_sel_init_fn_t sel_init_proc=NULL;
      void *user_data=NULL;
      int response;
      int count;
      tag_p_t object;
    char offset='1';
    uf_list_p_t faces=NULL;
    uf_list_p_t p1,p2;
    
    tag_t feature_obj_id;
      UF_UI_select_with_class_dialog(message,title,scope,sel_init_proc,user_data,
     [$response,&count,&object)]  
    tag_t  face[132];    
    int i;    
    for(i=0;i<count;i++)
    {
      face=*object;
      p1=(uf_list_p_t)malloc(LEN);
      p1->eid=face;
      if(i==0) {faces=p1;p2=p1;}
      else  
      {
        p2->next=p1;
        p2=p1;
      }
           
      object++;
    }
    
    UF_MODL_create_face_offset([$offset,faces,&feature_obj_id)]
调试时发现feature_obj_id=0啊!
作者: acoka    时间: 2004-6-10 14:57
  char message[133] = { '\0', };
  strcpy(message,"please select face\0");
  char title[133] = { '\0', };
  strcpy(title,message);
  
  int scope = UF_UI_SEL_SCOPE_WORK_PART;
  UF_UI_sel_init_fn_t sel_init_proc = NULL;
  
  void *user_data = NULL;
  int response = 0;
  int count = 0;
  tag_p_t object;
  char offset = '1';
  uf_list_p_t faces = NULL;
  
  tag_t feature_obj_id;
  UF_UI_select_with_class_dialog( message,
                  title,scope,
                  sel_init_proc,
                  user_data,
                  &response,
                  &count,
                  [$object)]
  tag_t face[132];     
  uf_list_p_t p1, p2;
  
  for(int i=0; i<count; i++) {
  
    face = *object;
    p1 = (uf_list_p_t)malloc(LEN);
    p1->eid = face;
  
    if( i==0 ) {
      faces = p1;
      p2 = p1;
    }
    else {
      p2->next = p1;
      p2 = p1;
    }
  
    object++;
  
  } //for
  
    UF_MODL_create_face_offset([$offset,faces,&feature_obj_id)]
  
不懂,但顶你一下
作者: zzz    时间: 2004-6-10 21:39
直接这样吧:
  
UF_MODL_create_face_offset(offset,faces,[$feature_obj_id)]




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3