how to get the feature type pointer from the LPDISPATCH

Discussion in 'SolidWorks' started by syshieley, Aug 21, 2006.

  1. syshieley

    syshieley Guest

    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
     
    syshieley, Aug 21, 2006
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.