iCAx开思工具箱

标题: 帮忙看一下这个代码 [打印本页]

作者: endiaons    时间: 2005-8-10 08:39
标题: 帮忙看一下这个代码
void show()
{
  char cue1[] = "cue1";
  char title1[] = "title1";
  char cue2[] = "cue2";
  char title2[] = "title2";
    tag_p_t object1,
        object2;
    int response_w1,
    response_w2,
    count_w1,
    count_w2;
  double * min_dist;
  double pt_on_ent1[3];
    double pt_on_ent2[3];
    double * av;
  
  UF_CALL(UF_UI_select_with_class_dialog(cue1, title1,
    UF_UI_SEL_SCOPE_WORK_PART,NULL, NULL, [$response_w1, &count_w1, &object1))]    //选择第一个对象  
  
  UF_CALL(UF_UI_select_with_class_dialog(cue2, title2,
    UF_UI_SEL_SCOPE_WORK_PART,NULL, NULL, [$response_w2, &count_w2, &object2))]    //选择第二个对象  
  
  UF_MODL_ask_minimum_dist_2(*object1, *object2,  
  0, NULL, 0, NULL,[$min_dist,pt_on_ent1,pt_on_ent2,&av)]
  
  UF_free(object1);  
  UF_free(object2);     //要释放两个对象的tag
  
}
  
出现错误:
d:\exercise\809\modl\modl.cpp(91) : error C2664: 'UF_MODL_ask_minimum_dist_2' : cannot convert parameter 7 from 'double **__w64  ' to 'double *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
  
Build log was saved at "file://d:\exercise\809\modl\Debug\BuildLog.htm"
modl - 1 error(s), 0 warning(s)
作者: rotos    时间: 2005-8-11 00:28
选择多个对象用UF_UI_select_with_class_dialog(cue, title,  
   UF_UI_SEL_SCOPE_WORK_PART,NULL, NULL, &response, &count, &object),选择后object[i](i<count)就代表了选择的count个对象,没有什么object1、object2,你若只选择一个对象就用UF_UI_select_with_single_dialog,参数类似。




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