How can I know if there is a project in the projects manager? I want to make a tool to read all projects and then unload all.
Thanks in advance
I created a hidden variable, for example _CLIENT_VBAAUTOLOADS and my PCF file builds the list of MVBA's that need to be loaded based upon client needs. In my Site.cfg file, I use
MS_VBAAUTOLOADPROJECTS > $(_CLIENT_VBAAUTOLOADS) to setup the loading of the MVBA's.
However, this did nothing to unload the MVBA already loaded when MicroStation first starts, since MicroStation always loads the last project used when it first opens. I was able to develop this mvba which is run via and OpenCloseEventHandler.
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration Maryland DOT - State Highway Administration User Communities Page
caddcop -
It appears to me that you have already resolved the issue I am having: after exiting MicroStation, the client-based VBAs are not unloading - and are showing up after I restart MicroStation and select a different client-based workspace (project). If I exit MicroStation and select the same workspace the 2nd time, all is OK.
I have looked at your VBA script - to figure out if I could do something similar but I do not have any programming experience that would guide me through the process :-(
I am looking for something real basic (simple) - that will unload all (or specific) VBAs when running the PCF file, and then just load whatever new VBA files are specified in the PCF - using MS_VBAAUTOLOADPROJECTS =
Even if the users have to completely exit MicroStation to switch workspaces (projects), that would be better than what we have going on now.
Currently, I am in the "testing" mode for V8i workspaces - I am just suprised I have not had this issue while working with my V8 (2004) or V8-XM workspaces.
I have a ticket in with Bentley on this issue [8001139852] - but so far they have not provided a solution.
It seems like such a simple task that I am surprised there is not a simple work-around by now.
Thnaks for any insight you could provide.
I don't know if it was a problem in the past because we had fewer standards and I was using real PCF files that were specific to different projects and in the PCF files, I used %include to include client based PCF files to get the client standards. So often, I was changing projects but not clients.
Now, I'm using only client based PCF files but have six or seven client workspaces that were stepping on each others toes when it came to VBA projects.
I am creating a word document and zip file with the ASCII VBA code and directions for how this works and how to use the ASCII VBA files to build a MVBA that can do what you need.
It may take a few days. Please be patient..
this may help you:
CadInputQueue.SendCommand "VBA UNLOAD " & oVBE.ActiveVBProject.Name