How can I script my Macro so that it closes microstation after the macro is done?
Best regards
Robert
Hi Robert,
something like
CadInputQueue.SendKeyin "exit"
would be enough.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thanks a bunch, this solves my issue with time scheduled automated batching!
Do you also know if you can VBA script so that a file thats in DGN is saved as DWG in the same location as the DGN?
All I need is the code that saves the file in the other format...
I've been using batch convert until now (I have to do this every week for hundreds of files) but I am looking over the solution to time Schedule this aswell.
I also have to convert it back from DWG to DGN after.
Thanks a bunch!
Robert Edlinger said:Do you also know if you can VBA script so that a file thats in DGN is saved as DWG in the same location as the DGN?
SaveAs method is what you need. But you have take care about creating a proper file name. Something like this code:
Dim fileName As String fileName = ActiveDesignFile.Name fileName = Replace(ActiveDesignFile.Name, ".dgn", "") fileName = fileName & ".dwg" ActiveDesignFile.SaveAs fileName, True, msdDesignFileFormatDWG
magnificent!
Now all I want is that the working units of these exports always are in meters....