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