When saving cross sections to multiple files with OpenRoads Designer, managing the annotations can become challenging. OpenRoads Cross Section Annotation Batch Processor semi-automates this process. It allows the user:
OpenRoads Cross Section Annotation Batch Processor.zip
Tim,
I have used this VBA, very helpful BUT, can some improvements be made to it?
I only know maybe .001% of VBA programming, so I stumbled around and increased the size of the dialog box due to the longer paths to our files and narrowed down the drive list to just our working drive.
The upgrades I'd like to see are having the VBA send the data clicks so users don't have to jiggle the mouse to accept the inputs on every sheet. May need to add a couple of seconds delay after the first click to allow the annotation deletion to finish. Makes it more hands off to run. And to include the entries be to define the starting location of the app's dialog box, as it is usually located too high on the screen so I can't grab the title bar to move it down. Couldn't check the box to delete existing annotations because it was off-screen, till I edited the dialog box definition and moved the checkbox to the bottom.
Also, I see the VBA shows calling "C:\ProgramData\Bentley\OpenRoads Cross Section Annotation Batch Processor.ini" which does not exist. Can you provide some documentation of what settings can be made default/changed by editing this .INI file? Or if upgrading the VBA, have additional drop-downs to select the override annotation group from the list of available in the config in case it is not yet loaded in the current file.
Mike Nelson
USACE Galveston
Hi Mike, unfortunately, my role in the company has changed so I won't be able to work on this.
In answer to your requests, sending datapoints automatically to have the macro progress would be tricky in this case, as some user input is required.
It's been quite a while since I looked at this but the default behavior for the dialog box location is centered on the parent application. I must be overriding that default behavior. That's where the INI file comes in. It's essentially equivalent to the UPF file, saving off the user's settings and then recalling them on startup. I would look at this.
I don't think you can get at the annotation group with VBA. The API has not been extended to OpenRoads Designer.
Thanks Tim!
Understandable about you moving up and away from this level. Congratulations!
Do you have any info on the configuration of the .INI file? It does not exist nor is it created on my PC when I run the VBA, so I do not know which variable names to add and what values they should receive.
Beyond this, it looks to be something that needs to go in as a program suggestion rather than a VBA upgrade...
Thanks, Mike
Hi Mike, the info that is being written to the INI file is the value of the delete existing annotations checkbox, the top location of the form, and the left location of the form. If it's giving you fits, just comment out that portion of the code, first where the INI file is created and, second, where it's read.