How to hide and unhide with toolkit, check out my code!
Can anyone please check out my code here, trying to hide selected components with proselectbuffer here, it worked just before it crushed, can anyone help me out, thanks.
ProError ShowMessageText(ProModelitem *modelitem)
{
/*********************************************************/
AFX_MANAGE_STATE(AfxGetStaticModuleState());
ProError status,err1,err2,err3;
ProSelection *sels;
ProAsmcomppath comppath;
ProMdl mdl;
status = ProSelbufferSelectionsGet(&sels);
// status = ProSelectionModelitemGet(sels[0],modelitem);
status = ProSelectionAsmcomppathGet(sels[0], &comppath);
status= ProAsmcomppathMdlGet(&comppath,&mdl);
if(status == PRO_TK_NO_ERROR)
{
AfxMessageBox(_T("get mdl"));
status=ProMdlToModelitem(mdl,modelitem);
if(status == PRO_TK_NO_ERROR)
{ AfxMessageBox(_T("pass")); }
modelitem->type = PRO_FEATURE;
modelitem->owner = comppath.owner;
modelitem->id = comppath.comp_id_table[0];
err2 = ProModelitemHide(modelitem);
if(err2 == PRO_TK_NO_ERROR)
{ AfxMessageBox(_T("done")); }
ProSelectionarrayFree(sels);
}
return PRO_TK_NO_ERROR;
}

