how to use the LPDISPATCH data to access the vertex?

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

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.