Build Kick Off - _USTN_SITE

SPS_APPL.CFG, SITE.CFG it doesn't really matter what you call it, but this cfg files is the lynch pin for the whole system. The idea here is that any cfg file located in the \MicroStation\appl\ directory is read each time MicroStation or the verticals is loaded. The only issue I have come across so far, recently, is the need to copy the cfg file in custom locations if you're using power products that have been introduced by Bentley. Basically, these are products that have been captured as stand-along with MicroStation included as a part of the product rather than as a separate install. If you are using power products then you must cater for the appl location as delivered with that product. I came across this recently with Raceways.

The cfg itself is quite simple. At the start I set the location of a few directories:

#---------------------------------------------------------------------------
# Set company drive mappings
#---------------------------------------------------------------------------
netwrk_bld = Z:/_CADDdev/Bentley/Standard/
local_bld = C:/_CADDdev/Bentley/Standard/

These set the 2 locations where my build may be. If you notice you can, very easily, set this build to run locally as well as off the network. You'll notice I have used '_CADDdev' here, the reason for this is that I always maintain a master build and a development build. It's a good habit to get into doing all your testing in the development build before copying it into the master build for implementation. If I'm doing the development work myself I use BeyondCompare to copy and update files between my builds. Check out the information under the Discussion threads on how to get BeyondCompare. Later on I'll also go into a few other additions I have for the hta for my dev builds to make debugging etc much easier. Also remember that you must have your appl.cfg files pointing to the correct locations depending on whether it is the dev or master build. Now these are set, we need to detect the version of MicroStation loaded:

#---------------------------------------------------------------------------
# MicroStation Version
#---------------------------------------------------------------------------

%if defined (_VERSION70)
STD_MS = MS70
%endif

%if defined (_VERSION80)
STD_MS = MS85
%endif

%if defined (_VERSION_8_11)
STD_MS = MS811
%endif

I'm not using XM, but to complete the list you could add the XM version find as well. The reason for defining the version of MicroStation to be used is that we want to split our builds based on version. This is important as the differences between versions can be large enough to create issues so splitting them makes this easier to manage. Especially if verticals are used as well.

Last thing to do is set the location for _USTN_SITE. The reason for using this is that MicroStation will run any cfg file located in this defined location, no include statements required and you're not interfering with the install location either. This makes things much easier to manage, bug fix and build on.

To pick up the build locally we use:

%if exists ($(local_bld)$(STD_MS)/Standards/.)
_USTN_SITE = $(local_bld)$(STD_MS)/Standards/
%endif

The reason for putting this first is that we want the network build to be used over the local build any time a user is back on the server. So, we always have:

%if exists ($(netwrk_bld)$(STD_MS)/Standards/.)
_USTN_SITE = $(netwrk_bld)$(STD_MS)/Standards/
%endif

ALWAYS remember to have the extra return carriage (blank line) at the end of a cfg file or it will not run correctly. Easy trap to get into.

We'll revisit this again once we have covered our hta file. there are a few things you can do to make life much easier for yourself as well as making the build much more dynamic and easier to control. Imagine a build with no pfc files......

More soon.