Hai,
I want to export the CoOrdinates of all elements in a dgn. How to perform this by using vba? [Microstation version 0.8.05.01.25 Windows x86]
Unknown said:Is there anyother way/option to execute this inbuilt functionality for the collection of dgn files(like Batch mode)?
Have you checked available key-ins? There is a full suite of key-ins like export file, export prefix etc. that seem to be suitable to set all export parameters. And if the parameters can be set using key-ins, they can be used in the batch process.
It's a shame you use so old MicroStation version, because it's much easier to set active tool parameters in the current V8i.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hai Jan,
I have to just export the CoOrdinates for a collection of dgn files. As you mentioned, the functionality which is available in Microstation by default, is well enough for my purpose. But in case of many dgn files, it would be a time consuming process, if it is done manually.
I tried recording a macro(for inbuilt export Coordinates functionality) - Refer attachment. But unable to manipulate the click event of buttons(Single/Fence/All) which is available in that (Export Coordinates)dialog box. Is there anyother way/option to execute this inbuilt functionality for the collection of dgn files(like Batch mode)?
TestExport.mvba
Hi Dharmarajan,
your question is pretty general (what means "all elements", what output format is required and other details are missing), so only general answer can be provided.
At first you should evaluate if VBA is really required and if XYZ Tool export functionality, which is available in MicroStation by default, isn't enough for your purposes.
If VBA is the way from any reason, the code will be probably more "extensive/long" than "complex":
You should be aware it's not possible to process all elements in the file using MicroStation VBA, because VBA API doesn't provide access to all element types (e.g. to 3D solids).
With regards,