马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
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],¤t_model_item);
ProGeomitemToEdge(¤t_model_item,¤tedge);
ProEdgeLengthEval(currentedge,&length);
totlength=totlength+length;
}
return totlength;
} |