MicroStation CONNECT 10.17.00.209
I have a VBA from a client that is locked, it runs a startup macro and throws a file not found error every time a DGN file is opened. Is there a logging system I can turn on to find out WHICH file it's trying to find so I can fix it? VBA is locked from viewing.
Hi Kevin van Haaren,
If you are in need or trying to identify What Files (Registry, Network, or public Call Stacks) are being accessed, the results of each and in Sequential order, I suggest learning, using and applying Microsoft Process Monitor to help provide background troubleshooting details and empirically inform you of what (any) applications are doing at a point in time and the order/locations performed (by design).
Granted the immediate results can be overwhelming so try to limit the capture (time) to the individual workflow/action in question then Search and check out a few YouTube videos like (Search: Create Effective Promon Filters) this one.
No matter what, you will likely find the information you need by capturing and filtering a Microsoft Process Monitor log around the event of interest.
HTH,Bob
Answer Verified By: Kevin van Haaren
Ah thanks, I'll give that a go.
Process Monitor was the way I went. I used Procmon64.exe and if you want usable info from Procmon it's important to narrow down the amount of monitoring you do via the Filters.
Rather than monitoring an entire "open a file and wait for the error to happen" cycle I first I figured out which vba was causing the problem. It was an autoload one so I just brought up the list of VBA's with key-in vba run then manually ran each of the OnProjectLoad macros to figure out which it was.
Now I could trigger the problem on demand. I started up procmon and added a filter:
Process Name is not OpenRoadsDesigner.exe => Exclude
I also turned off network and registry monitoring since I figured they weren't the cause.
I started the monitor, triggered the error, stopped monitoring. Still had tons of events, but I could see there was frequently a result "NAME NOT FOUND" so I added a filter to exclude all other result messages.
Ah, now I can see it among the other name not found errors (usually dll.config files), one more filter to see all the paths it was checking for that file. That let me figure out which config variable it was using to look for the file, and that led me to find the error in my config file that was excluding the one directory the file was in.
Thanks for the reminder about procmon.
Glad to hear that helped to resolve your issue.
For cases of "Files not found" the path I find most effective is to "Create a Filter" (e.g. MicroStationFilesNotFound) and Save/Share wither others as a *.pmf file; to readily load the "next time" of need; consisting something like below as a starting point: