how to get the feature type pointer from the LPDISPATCH

dear all,

i used the codes: pModelDocExtension->SelectByID2(auT("Extrude2"), auT("BODYFEATURE"),0,

0, 0, FALSE, 0, NULL, swSelectOptionDefault, &retval); pModelDoc->get_ISelectionManager(&pSelMgr); pSelMgr->GetSelectedObject6(1, 0, &Retvala);

to access the feature named extrude2 from an active part, after that i want to access the selected feature, but cannot do it in the below way as: LPFEATURE pCurFeature; pCurFeature = (IFeature*)Retvala; LPFEATURE pSubFeat = NULL; pCurFeature->IGetFirstSubFeature(&pSubFeat);

whenever i ran it, there are errors

BTW, i am using the dll to do the solidworks API,i don't know how to debug the codes which would create dll file, anyone can give me a hint?

thanks

regards SY

Reply to
syshieley
Loading thread data ...

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.