Is there a way to export select models from a dgn file in VBA?

I have an issue where I am needing to open a seed/template file, Import model files from an existing, then export select models together into a new design file.

Manually i can do this by recording my actions of opening a template seed file, import models then go to the File>Save As... and from the V8 save as options dialog box>Filters tab click on the models button and individually choose models to save into the new file. But the delima is the recorded macro always just gets all the models not the ones i select.

 

How can i perform the same functionality of the save as options to specify individual models to save into the new drawing?

What ultimately i want to occur is to change the default model file by using the above mentioned methods.

 

Thank you in advance for any assistance provided.

Parents
  • Enumerating DGN Models

    A DesignFile object has a collection of Models. You need to OpenDesignFileForProgram your source DGN file, then enumerate DesignFile.Models. Filter out the models you don't want to copy. Then, add the models in that list to your ActiveDesignFile.Models collection.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply
  • Enumerating DGN Models

    A DesignFile object has a collection of Models. You need to OpenDesignFileForProgram your source DGN file, then enumerate DesignFile.Models. Filter out the models you don't want to copy. Then, add the models in that list to your ActiveDesignFile.Models collection.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Children