|
谁能帮我看看这段代码有什么问题吗,该怎么改呢?ProFeatureWithoptionsDelete返回-2,前面的函数都返回成功,编译能通过。
ProMdlCurrentGet((ProMdl*)&p_solid);
CArray<ProFeature,ProFeature> feat_list;
ProSolidFeatVisit(p_solid,(ProFeatureVisitAction)FeatureAsmVisitAcFn_chill,NULL,(CArray<ProFeature,ProFeature>*)&feat_list);
for (int i=0;i<feat_list.GetCount();i++)
{
err=ProFeatureTypeGet(&feat_list[i],&p_type);
if (p_type==PRO_FEAT_DATUM_POINT)
{
char a[20]="POINT_CHILL_";
char c[20],b[20];
ProName ptn_name;
ProModelitemNameGet(&feat_list[i],ptn_name);
ProWstringToString(b,ptn_name);
if (!strncmp(a,b,12))
{
int* Pointarray;
ProArrayAlloc(0,sizeof(int),1,(ProArray*)&Pointarray);
ProArrayObjectAdd((ProArray*)&Pointarray,-1,1,&feat_list[i].id);
ProFeatureDeleteOptions p_opt[]={PRO_FEAT_DELETE_CLIP};
err=ProFeatureWithoptionsDelete((ProSolid)feat_list[i].owner,Pointarray,p_opt,PRO_REGEN_NO_FLAGS);
}
}
} |
|