[V8i C++] Best way to retrieve POD files?

Currently I am checking for and storing the eeh for each pod file using mdlscancriteria..  

What if the user attaches a pod file after I have does this scan... Do I need to continously run this scan every time I want to run a process?

Is there a *_setfunction function that will notify me if a pod file was attached? That way, I could scan once, and any time a pod is attached, I can append to my array.  Any thoughts would be great!


This is what I am currently using.. I would really like something more efficient.


POD_Files.clear();

ScanCriteriaP scP = mdlScanCriteria_create ();

mdlScanCriteria_setModel(scP, ACTIVEMODEL);
mdlScanCriteria_setReturnType (scP, MSSCANCRIT_ITERATE_ELMREF, false, true);
mdlScanCriteria_setElemRefCallback (scP, ScanCrit_Locate_POD_Files, NULL);
mdlScanCriteria_addSingleElementTypeTest (scP, EXTENDED_ELM);
mdlScanCriteria_scan (scP, NULL, NULL, NULL);


mdlScanCriteria_free (scP);



	int ScanCrit_Locate_POD_Files (ElementRef elemRef,void* callbackArg, ScanCriteria* scP){

ElemHandle eh (elemRef, ACTIVEMODEL);

PointCloudHandler* handlerP = dynamic_cast<PointCloudHandler*>(&eh.GetHandler ());
if (NULL != handlerP)
{
POINTCLOUDDATA.POD_Files.push_back(eh.GetElemRef());
}

return SUCCESS;
}
Parents
  • Maury said:
    What if the user attaches a pod file after I have does this scan... Do I need to continously run this scan every time I want to run a process?

    A scan creates a snapshot of a DGN model.  If the scene changes after you've taken a snapshot, you must take another snapshot if you want a record of the new scene.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • Maury said:
    What if the user attaches a pod file after I have does this scan... Do I need to continously run this scan every time I want to run a process?

    A scan creates a snapshot of a DGN model.  If the scene changes after you've taken a snapshot, you must take another snapshot if you want a record of the new scene.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data