This wiki will cover some of the workarounds and solutions on how to fix the ProjectWise managed workspace error "Last Error [222]" (shown below). This only happens when loading a different workspace than the previously loaded configuration with a CONNECT product using power platform Update 17 or higher (for ORD this would be 2022 Release 1 (10.11) or newer) which is causing it to break the managed workspace. This error was introduced with MicroStation CONNECT Edition update 17.
Solution 1 (Temporary & Manual Fix)
This will require you to navigate within windows explorer to delete a cache.ucf file. Follow the steps below.
First navigate to the windows task bar and select the Windows Explorer icon and right click.
Next drill down through the Windows (C:) by going to C:\Users\[username]\AppData\Local\Bentley\OpenRoadsDesigner\10.0.0_X\prefs\
(Note: the _X may vary depending on how many side-by-side load versions of ORD you have on your machine.)
Select and right click the Cache.ucf file and select the delete option.
Now that once the Cache.ucf file has been deleted you should be able to open the file again without the "Last Error [222]" dialog popping up. Note that this is not a permanent fix. This file will get recreated every time you load ORD and the error will return the next time you load a different workspace from the previous loaded configuration.
Solution 2 (Preferred solution)
Clear and lock variables _USTN_CACHECFG and _USTN_CACHEWSCFG in a Predefined CSB. This MUST be done at the predefined level, or it will not work.
_USTN_CACHECFG = %lock _USTN_CACHECFG
_USTN_CACHEWSCFG = %lock _USTN_CACHEWSCFG
We have noticed in some cases that the below error message is shown when closing the file.
(If you need further assistance with this workaround submit a CADD & Mapping support request here.)
Solution 3 (vba driven, Partial Fix)
ODOT has created an .mvba that will delete the cache.ucf file every time you open a file. Note that this solution only prevents the error from happening in the future but doesn't actually fix the error. This is because in order for this vba to run it has to get past loading the managed configuration which is where the error is happening. So, if you are still getting this error then the cache.ucf file needs to be deleted as described in solution 1. Also note if you launch ORD using a configuration that does not include this vba than that will re-introduce the error again.
The startupManagedWSFix.mvba can be downloaded here (clicking the like will prompt direct download in browser).
To configure the startupManagedWSFix.mvba to autorun on file open you will need to set two configuration variables:
Note: if you're working within ProjectWise, it is best to set this up in Predefined. If you're working outside of ProjectWise and within ProjectWise, you may want to add the configuration variables at the Organization level to all configuration locations.
Deleting the cache.ucf file makes it so that your last used configuration won't be saved. Within ProjectWise Managed workspace this is not used but if using ORD outside of ProjectWise you will notice the last used configuration will no longer be populated in the ORD start up screen. Unfortunately, a few downsides are that this .mvba is run every single time you open a .dgn (may possibly cause longer load times).
If your organization is running OHDOTCEv02 WorkSpace then the OHDOT_v2_WorkSpace.cfg has already been modified (since 9/1/23 Standards update). It is important to make sure that your workspace is up to date to ensure the config file isn't resetting the variables.
If you are still running the OHDOT (v1) WorkSpace (which is retired as of 3/6/23) for existing projects, you'll need to manually fix the line 639 within the OHDOT_WorkSpace.cfg shown below by replacing the = to either < or >. so that the variable is no longer reset.
# Autoload Bentley provided apps for Openroads:
MS_VBAAUTOLOADPROJECTS = $(_USTN_WORKSPACESTANDARDS)Vba/ViewSet
or copy code below.
# Autoload Bentley provided apps for Openroads:
MS_VBAAUTOLOADPROJECTS < $(_USTN_WORKSPACESTANDARDS)Vba/ViewSet
(If you need further assistance with this solution, please submit a CADD & Mapping support request here.)
ODOT has already submitted a Bentley Defect (#941755) on this issue.