Recently on bentleyuser.org...
© bentleyuser.org 2019
Printed from www.bentleyuser.org © TMC Publications (UK) Ltd 2010
Five Steps to .upf Heaven!
by Marc Thomas - 10 June 2005
Or more prosaicallyÖHow to put your upf file in a Windows Roaming Profile.
Like everything else there are probably lots of ways to do this. The one I have adopted combines changes to MicroStationís configuration plus additions to the Windows 2000 login script.
All of this assumes that you already have MicroStation set up with a networked workspace and are the MicroStation system administrator. It also assumes that your network uses Windows NT/2000/2003 Roaming Profiles.
First lets cover the login script. This is needed because (as far as I know) MicroStation will not create the folders needed in the userís profile when a user first logs on.
I have elected to create a folder in the user profile called V852 for the current version. When XM comes along Iíll probably add a new folder called XM. This contains the prefs and dwgdata folders. These need to be in place when the user opens MicroStation for the first time so that the .upf can be created in the prefs folder. If the folder is not there the user gets a command window saying that the upf cannot be created.
Ask your IT support people to add the following into their logon script:
IF NOT EXIST "%userprofile%\v852" mkdir "%userprofile%\v852"
IF NOT EXIST "%userprofile%\v852\prefs" mkdir "%userprofile%\v852\prefs"
IF NOT EXIST "%userprofile%\v852\prefs\dwgdata" mkdir "%userprofile%\v852\prefs\dwgdata"
To add a folder called XM this just needs to be updated replacing v852 with XM.
I believe that similar lines can also be used to delete the files, eg:
IF EXIST "%userprofile%\v851\prefs\dwgdata" del "%userprofile%\v851\prefs\dwgdata"
Öbut I have not got around to trying this yet.
Having created the necessary folders we then need to tell MicroStation where to put things and where to find them afterwards.
Edit the mslocal.cfg File
Add the following lines to your mslocal.cfg file to tell MicroStation to put the .ucf into the user profile:
_USERPROFILE = %USERPROFILE%
And this one to tell it to use the Windows username as MicroStationís user name:
_USTN_USERNAME = $(USERNAME)
Create a Shortcut to Your mslocal.cfg
To avoid the tedium of doing this to every installation you can put a copy of the modified mslocal.cfg onto a network share and add a modified shortcut to your system, easy if you have used Windows Group Policies to provide a common networked Start Menu to all users (if your IT people have not done this you could ask them why not, itís easy and very useful!).
This shortcut needs to be something like:
This is all on one line obviously, the crucial part being the Ėwc switch that tells MicroStation to go and find the adpV852mslocal.cfg file that contains the modified lines above (amongst other things). This example is pointing to the test workspace on my e:\ drive, MicroStation has been installed into c:\Program Files\V852.
Create a User Preferences Seed File
The other thing you can do is create a seed file for the user preferences. Create a new .upf on a test userís login (delete/rename the old one). Set the Preferences, arrange the Toolboxes, open an example file, whatever you want a new user to find in their preferences, then close MicroStation. Find the fresh .upf that you have just created and rename it to standard.spf. Put this in your workspace\Standards folder and add the following line to your site configuration (standards.cfg by default):
MS_USERPREFSEED = $(_USTN_SITE)standard.spf
Compress .upf files
The following lines can be added to your standards.cfg to keep the size of upf files down:
MS_MONITOR_USER_PREFS = 1
MS_COMPRESS_USER_PREFS = 1
This compresses .upf files over 500k if they get that big in the first place.
Thatís it, four steps to hassle free upf creation. Since implementing this I donít have a .upf on my system above 200k.