![]() |
|
This example demonstrates how to obtain the entity id for a given object that supports the ISkpEntity interface.
To obtain Entity information, one queries the object for its ISkpEntity interface, where the get_Id()
method lives.
A list of coclasses that support the ISkpEntity interface can be found by looking at the ISkpEntity documentation
HRESULT GetId(ISkpFace* pFace, long *pId) { if(pId == NULL) { return E_POINTER; } // Get the ISkpEntity interface from the face CComPtr<ISkpEntity> pEntity; HRESULT hr = pFace->QueryInterface(IID_ISkpEntity, (void**)&pEntity); if(FAILED(hr)) { return hr; } // Now get the entity ID from the ISkpEnity interface return pEntity->get_Id(pId); }
©2010 Google - Google Home - About Google |