Just like a block reference (INSERT) entity refers to the underlying definition in a the block table, the raster image reference (IMAGE) entity refers to an underlying definition in a dictionary 'ACAD_IMAGE_DICT'. Using ObjectARX you can open up each AcDbRasterImageDef entry and retrieve its path information as shown in the sample ARX code below:
void ImagePath()
{
AcDbDictionary *pDict;
Acad::ErrorStatus es;
es=acdbHostApplicationServices()->workingDatabase()->
getNamedObjectsDictionary(pDict, AcDb::kForRead);
if (Acad::eOk != es)
{
return;
}
pDict->close();
AcDbObject *dictObj;
es=pDict->getAt(_T("ACAD_IMAGE_DICT"), dictObj, AcDb::kForRead);
if (Acad::eOk != es)
{
return;
}
AcDbDictionary *dictImg = AcDbDictionary::cast(dictObj);
if (NULL == dictImg)
{
dictObj->close();
return;
}
AcDbDictionaryIterator *pIter;
AcDbObject *pObj;
pIter = dictImg->newIterator();
AcDbRasterImageDef *imgDef;
for(; !pIter->done(); pIter->next())
{
pIter->getObject(pObj, AcDb::kForRead);
imgDef = AcDbRasterImageDef::cast(pObj);
if (NULL != imgDef)
{
acutPrintf(_T("Image found at: "));
acutPrintf(imgDef->activeFileName());
acutPrintf(_T("\n"));
}
imgDef->close();
}
delete pIter;
dictObj->close();
}