找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
查看: 16300|回复: 0
打印 上一主题 下一主题

[求助] 这段代码怎么会出错呢,请教高手啊

[复制链接]
跳转到指定楼层
1
发表于 2009-4-22 11:15:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
这段代码就是想对打开的模型所有特征进行访问,可是编译时告诉说>正在编译...
1>Dlg.cpp
1>e:\vc++2005example\myprogram\myprogram\dlg.cpp(88) : error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'ProFeatureVisitAction'
1>        None of the functions with this name in scope match the target type
1>生成日志保存在“file://e:\vc++2005example\myprogram\myprogram\Debug\BuildLog.htm”
这是什么原因呢?好像是说访问函数的事啊!有懂的吗?谢谢啊!!


////下面是在树控件中显示模型的特征树 m_tree.DeleteAllItems(); status=ProMdlNameGet(model,name); ProWstringToString(strName,name); HTREEITEM hItem=m_tree.InsertItem(TVIF_TEXT|TVIF_PARAM,(CString(strName)),0,0,0,0,-1,NULL,NULL); CArray*p_FeatureList=NULL; status=ProSolidFeatVisit(cur_solid,(ProFeatureVisitAction)PartFeatVisFn,NULL,(ProAppData)p_FeatureList); numoffeat=(int)p_FeatureList->GetCount(); if(numoffeat==0)return TRUE; for(int i=0;iGetAt(i),name); if(status==PRO_TK_E_NOT_FOUND) { ProFeatureTypenameGet(&p_FeatureList->GetAt(i),name); ProWstringToString(strName,name); sprintf(strName,"%s ID numeber %d",strName,p_FeatureList->GetAt(i).id); } else if (status==PRO_TK_BAD_INPUTS) { sprintf(strName,"invalid!"); } else { ProWstringToString(strName,name); } m_tree.InsertItem(TVIF_TEXT|TVIF_PARAM,CString(strName),0,0,0,0,i,hItem,NULL); } m_tree.Expand(hItem,TVE_EXPAND); ////显示完毕 return TRUE; } /////访问动作函数 ProError PartFeatVisFn(ProFeature* p_feature,ProError status,CArray* app_data) { ProBoolean isVisible; int* r_failed_feat_ids; int num=0; ProBoolean p_is_incomplete; ProFeatStatus p_status; status=ProArrayAlloc(0,sizeof(int),1,(ProArray*)&r_failed_feat_ids); status=ProSolidFailedFeatsList((ProSolid)(p_feature->owner),&r_failed_feat_ids); status=ProArraySizeGet((ProArray)r_failed_feat_ids,&num); for(int i=0;iid==r_failed_feat_ids[i]) { ProArrayFree((ProArray*)&r_failed_feat_ids); return PRO_TK_NO_ERROR; } } //////// status=ProFeatureIsIncomplete(p_feature,&p_is_incomplete); if(p_is_incomplete!=PRO_B_FALSE)return PRO_TK_NO_ERROR; status=ProFeatureStatusGet(p_feature,&p_status); if(p_status==PRO_FEAT_SUPPRESSED)return PRO_TK_NO_ERROR; if(p_status!=PRO_FEAT_ACTIVE) return PRO_TK_NO_ERROR; status=ProFeatureVisibilityGet(p_feature,&isVisible); if(isVisible==PRO_B_TRUE) { app_data->Add(*p_feature); } return PRO_TK_NO_ERROR; }
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-11-18 00:39 , Processed in 0.021465 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表