HolePtr (V17)

[ Edited ]



now I have a new question about the HolePtr.


I have a PartDocument(attachment), and I can get the HoleDataPtr from the HoleDataCollectionPtr. But I want to get the FacesPtr of this HoleData, so I can only get the HolesPtr from the PartDoc at first, then get the HolePtr---->HoleData.


HolesPtr pHoles = pPart->GetHoles();


if(pHoles != NULL)



long pHoleCount = pHoles->GetCount ( );///Error!!pHoleCount is 0

LOG(DEBUGMSG("the Number of Holes is "

for (long i = 1; i


HolePtr pHole = pHoles->Item(i);

HoleDataPtr pHoleData = pHole->GetHoleData ( );



But here the count of the hole is 0,why?

Because I can get the HoleData from the HoleDataCollectionPtr, I think here the count of the hole is wrong!

any ideas?



Posted by: Julia Schneider
Post date: 6/6/2007 1:18:00 AM


RE: HolePtr (V17)

[ Edited ]



If you have not do so already, I would recommend that you download and install my Solid Edge Spy application. It will help you with this kind of work.


Your .par did not have any holes. I modified it and attached it to my post. Here is some psuedo code to get what you want.



PartDocumentPtr pPartDoc;

ModelsPtr pModels;

ModelPtr pModel;

HolesPtr pHoles;

HolePtr pHole;

HoleDataPtr pHoleData;


pModels = pPartDoc->Models;

pModel = pModels->Item((LONG)1);

pHoles = pModel->Holes;

pHole = pHoles->Item((LONG)1);

pHoleData = pHole->HoleData;




Posted by: Jason Newell
Post date: 6/6/2007 5:42:11 AM