how to use the LPDISPATCH data to access the vertex?

Aug 25, 2006 0 Replies

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



Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required