This is a rather odd occurence. I have a list of MVBA files which I auto-load into Microstation using the config variable MS_VBAAUTOLOADPROJECTS. The files are on a network server. For the most part they load as expected and the macros are available. At times the list of macros vanishes and fails to load upon restarting Microstation even though the MVBA files are intact. This usually happens after a crash, a macro debug session but can also occur at random. When this happens the MVBA files cannot even be manually loaded using the VBA manager. Only a full workstation restart restores the situation. This is happening several times daily.
Any ideas?
Benzi Papo said: I have a list of MVBA files which I auto-load into Microstation using the config variable MS_VBAAUTOLOADPROJECTS. The files are on a network server
Do you have exclusive use of those macros? If a VBA project is shared by multiple users, you run into file-locking imposed by Microsoft. You can modify how MicroStation loads VBA projects using configuration variable MS_VBA_OPEN_IN_MEMORY. Read about that in VBA help topic: MicroStation VBA Environment Variables.
MS_VBA_OPEN_IN_MEMORY
Regards, Jon Summers LA Solutions
I'm not sure if this variable is still used in CONNECT because I didn't see it in the list of available VBA variables. In previous versions I set this to:
MS_VBA_OPEN_IN_MEMORY = READONLY
The CONNECT docs don't mention this variable any more:
https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v15/en/GUID-E4CA0EFA-7FAD-ACA4-F5BF-CCE384213BB0.html
We have peak usage of around 100 concurrent users that access these resources.
Benzi Papo said:The CONNECT docs don't mention this variable
It remains in VBA help. But only someone from Bentley Systems can confirm whether or not it is valid in CONNECT.
The strange thing is that I can manually load any other MVBA project from that same network location as long as it is not included in the MS_VBAAUTOLOADPROJECTS list. Also if I copy an MVBA locally I can load it using VBA manager. It's as if the files in the MS_VBAAUTOLOADPROJECTS list somehow get locked by Microstation.
Benzi Papo said:I'm not sure if this variable is still used in CONNECT
Please see this response by Robert Hook.
Answer Verified By: Benzi Papo
Thanks Jon. So I set the variable in our default network configuration file at the WORKSPACE level:
MS_VBA_OPEN_IN_MEMORY=ALL
In order to allow me to edit MVBA files I set the variable at the USER level:
MS_VBA_OPEN_IN_MEMORY=READONLY
The issue has been resolved.