how to use the LPDISPATCH data to access the vertex?

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

  1. syshieley

    syshieley Guest

    Dear all,

    i want to access a vertex, first, i know its coordinates, so i used
    pModelDocExtension->SelectByID2(auT(""), auT("VERTEX"),XYZ[0], XYZ[1],
    XYZ[2], FALSE, 0, NULL, swSelectOptionDefault, &retval);
    to select the vertex and after that i want to get the adjacent faces of
    the vertex, so use the codes as below to do it
    pModelDoc->get_ISelectionManager(&pSelMgr);
    pSelMgr->GetSelectedObject6(1, -1, &Retvala);
    pVertexChosen = (IVertex*)Retvala;
    pModelDoc->ClearSelection2(TRUE);
    pVertexChosen->IGetAdjacentFacesCount(&m_iFaceCount);


    whenever i ran the codes of pVertexChosen = (IVertex*)Retvala; and
    pVertexChosen->IGetAdjacentFacesCount(&m_iFaceCount); at the same time,
    the program will die....

    don't know where the problem is

    thanks

    regards
    SY
     
    syshieley, Aug 25, 2006
    #1
  2. syshieley

    syshieley Guest

    :(
     
    syshieley, Aug 26, 2006
    #2
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.