processing multi-model files

I want to do some processing on every model in a list of dgn files.  I need to be able to do this in batch mode (initapps) as well as interactive mode.

 I tried mdlDgnFileObj_traverseModelIndex, but the models are not actually made active, so when the processing uses mdlElmdscr_read, I still just get elements from the default model.

I have thought about using mdlSystem_exchangeDesignFileAndModel, but can't find a concise way to get the model names.  I'm thinking this is my best bet, even if I have to use mdlDgnFileObj_traverseModelIndex to get the model names first.  Speaking of which, is there something like the StringList for MSWChar strings?

The other idea I had was to use mdlDgnFileObj_getModelRefList, mdlModelRefList_get and mdlModelRefActivateAndDisplay.  The problem with this is that it seems the "display" part of the function may not work so well for an initapp, and I can't find a better version of the function.

I am not looking for anyone to spend much time on this,  but I thought some of you might be willing to give me some advice.

Thanks, John 

Parents
  • Before you go spend a lot of time on the file/model management take a look at the builtin batchprocessor.  If you design your application right you can let the batch processor hand you the model and you just focus on processing it not spending time on building lists of files and models.

    HTH,

    Mark Anderson [Bentley]

     

  • Mark,

    Unfortunately, as far as the app is concerned, I think that it would be a step back in usability: we want the user to be able to set up the batch once for a project, and then kick off the process daily, weekly, or certain milestones with no setup (like a desktop icon to run microstation in initapp mode, or a button on a custom toolbar in microstation).  The "no setup" criteria becomes more important if they want anyone to be able to kick off the process, and not just the administrator who understands how it all works.

     However, I will admit that I knew nothing of the batch processor, and it seems to be a very powerful tool.  Now that I have done some research, played with, and learned about it, I will definitely  put it in my toolbelt in case I can use it down the road.

     Thanks, John

Reply
  • Mark,

    Unfortunately, as far as the app is concerned, I think that it would be a step back in usability: we want the user to be able to set up the batch once for a project, and then kick off the process daily, weekly, or certain milestones with no setup (like a desktop icon to run microstation in initapp mode, or a button on a custom toolbar in microstation).  The "no setup" criteria becomes more important if they want anyone to be able to kick off the process, and not just the administrator who understands how it all works.

     However, I will admit that I knew nothing of the batch processor, and it seems to be a very powerful tool.  Now that I have done some research, played with, and learned about it, I will definitely  put it in my toolbelt in case I can use it down the road.

     Thanks, John

Children
No Data