|
楼主 |
发表于 2016-10-19 16:00
|
显示全部楼层
void OK_Action(char*dialog,char*component,ProAppData data)
{
ProError status;
ProMdl part;
int cube_id1;
ProFamilyName name1;
ProStringToWstring(name1,"E:\LIANXI\cube.prt.1");
ProModelitem feature;
ProParameter param_1;
ProParameter param_2;
ProParamvalue value_1;
ProParamvalue value_2;
double InputPanel_1_value,InputPanel_2_value;
status=ProMdlRetrieve(name1,(ProMdlType )PRO_PART ,&part);
if (status !=PRO_TK_NO_ERROR)
{
AfxMessageBox(_T("ProMdlRetrieve error!"));
}
ProMdlDisplay(part);
ProMdlIdGet(part,&cube_id1);
ProModelitemInit(part,cube_id1,PRO_PART,&feature);
ProParameterInit(&feature,L"CUBE_L",¶m_1);
ProParameterInit(&feature,L"CUBE_H",¶m_2);
ProUIInputpanelDoubleGet("Simple","InputPanel_1",&InputPanel_1_value);
ProUIInputpanelDoubleGet("Simple","InputPanel_2",&InputPanel_2_value);
value_1.type =PRO_PARAM_DOUBLE;
value_1.value.i_val=InputPanel_1_value;
value_2.type =PRO_PARAM_DOUBLE;
value_2.value.i_val=InputPanel_2_value;
ProParameterValueSet(¶m_1,&value_1);
ProParameterValueSet(¶m_2,&value_2);
ProSolidRegenerate((ProSolid)part,PRO_B_TRUE);
ProUIDialogExit(dialog,1);
}
你看这是确定按钮的动作函数,为什么加了路径还是不能检索了,不好意思,我对这方面不是很懂。 |
|