iCAx开思工具箱

标题: 怎么进行交互选择啊 [打印本页]

作者: shu007    时间: 2009-4-17 12:34
标题: 怎么进行交互选择啊
proselect() 函数运行了,可是却无法在界面上交互选择啊!求教高手!!!!
作者: shu007    时间: 2009-4-17 14:09
eric老大!跪求help!      proselect() 函数运行了,可是却无法在界面上交互选择啊!求教高手!!!!


#include "ProToolkit.h"
#include "ProMdl.h"
#include "ProSolid.h"
#include "ProObjects.h"
#include "ProWstring.h"
#include "ProUtil.h"
#include "ProWindows.h"
#include "ProEdge.h"
#include "ProMessage.h"



int user_initialize(int argc,char*argv[])
{
       
        double h;
        double seleedges();
        h=seleedges();
        printf("h is %f",h);
        return(0);
}
void user_terminate()
{
//printf("pro/toolkit application terminated successfully\n");
return;
}
double seleedges()
{
        ProMdl model;
ProSelection *sel=NULL;
int n_sel,i;
int b;
ProModelitem current_model_item;
double length,totlength=0.0;
ProEdge currentedge;
ProWindowRepaint(PRO_VALUE_UNUSED);

ProSelect("edge",-1,NULL,NULL,NULL,NULL,&sel,&n_sel);
for(i=0;i<n_sel;i++)
{
ProSelectionModelitemGet(sel[i],&current_model_item);
ProGeomitemToEdge(&current_model_item,&currentedge);
ProEdgeLengthEval(currentedge,&length);
totlength=totlength+length;

}

return totlength;
}




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