WorkSpacePWSetup_Predefined_XXXX_CE.cfg


###################################################################################################
#
# Name: WorkSpacePWSetup_Predefined_XXXX_CE.cfg
# Description: Allows organization to augment a client's WorkSpace at the predefined level
# Author: Buddy Branham
# Date: 2022/02/28
# Version: 2.0.0.0
#
###################################################################################################
#
# Notes:
# - This file is included from Common_Predefined.cfg
# - 2021-05-14 Adjusted Dynamic Name logic
# - 2021-06-11 Added Nested WorkArea Capabilities (1.6.0)
# - 2021-08-09 General Upates to match 1.7.0 (1.7.0)
# - 2021-08-18 General Updates to more closely align with V8 version (1.7.1)
# - 2021-08-18 General Updates to more closely align with V8 version.(1.7.1)
# - 2021-02-21 Refactored and reorganized.(2.0.0.0)
# - 2021-02-27 Revise error messages.(2.0.0.0)
# - 2022-02-28 Initial Release (2.0.0.0)
#
###################################################################################################

###################################################################################################
# DYNAMIC CONFIG VARIABLE
#--------------------------------------------------------------------------------------------------
# The "_DYNAMIC_CONFIGS" variable can be appended in each cfg file to track
# loading of cfgs and other notations.
###################################################################################################

_DYNAMIC_CONFIGS > WorkSpacePWSetup_Predefined_XXXX_CE.cfg 2.0.0.0

###################################################################################################
# COMMON PREDEFINED VERSION MATCH VERIFICATION
###################################################################################################

%if !defined (_DYNAMIC_COMMONPREDEFINED_PWSETUP_MAJOR) || ((_DYNAMIC_COMMONPREDEFINED_PWSETUP_MAJOR)<8)
%error Workspace setup needs updated version of Common Predefined files.
%endif

###################################################################################################
# 1-OPTION: FIND NAME IN PATH
#--------------------------------------------------------------------------------------------------
# Parses _DGNDIR path to fine directory name relative to _DYNAMIC_WORKAREAROOT
###################################################################################################

%if defined (_DYNAMIC_WORKAREAROOT_NAME)
FINDDIR_SEARCHPATH:$(_DGNDIR) #Path to search, typically _DGNDIR.
FINDDIR_NAME=$(_DYNAMIC_WORKAREAROOT_NAME) #Searches FINDDIR_SEARCHPATH to find this directory name.
FINDDIR_NEST=1 #Sets nest level of directory to find up from "found" directory.
FINDDIR_UNDEF=1 #1, undefines variables to avoid copyout of each directory.
FINDDIR_FOUND=0 #Flag to identify if path has been previously parsed.
%include $(_DYNAMIC_DATASOURCE_BENTLEYROOT)FindNameInPath.cfg

_DYNAMIC_NEST1=${FINDDIR_FOUNDNAME}
_DYNAMIC_NEST1DIR=${FINDDIR_FOUNDDIR}
%endif

###################################################################################################
# 2-WORKSETS ROOT
#--------------------------------------------------------------------------------------------------
# Set the location for each WorkSet CFG and WorkSet DGNWS
# (see WorkSpacePWSetup_Predefined_Example_Scenarios.txt)
###################################################################################################


##### Define Worksets Root relative to a WORKAREA
%if defined (_DYNAMIC_WORKAREAROOT)
##### EDIT: Match path relative to WorkArea Root
_DYNAMIC_WORKAREA_CFG_PATH :_PWSetup/WorkSets/

%if exists ($(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_CFG_PATH))
_DYNAMIC_WORKAREA_CFG_ROOT:$(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_CFG_PATH)
%else
##### EDIT: Disable this error message if Worksets Root might not be in WorkArea
%error $(_DYNAMIC_MSG_NOT_FOUND) _DYNAMIC_WORKAREA_CFG_PATH: $(_DYNAMIC_WORKAREA_CFG_PATH)
%endif
%endif

##### If Cfg Root not found, set value to locaction in WorkSpace.
_DYNAMIC_WORKAREA_CFG_ROOT:$(_DYNAMIC_CEWORKSPACEROOT)WorkSets/

_USTN_WORKSETSROOT: $(_DYNAMIC_WORKAREA_CFG_ROOT)

%lock _USTN_WORKSETSROOT

###################################################################################################
# 3-WORKSET CFG
#--------------------------------------------------------------------------------------------------
# Set the location for each WorkSet CFG and WorkSet DGNWS
# (see WorkSpacePWSetup_Predefined_Example_Scenarios.txt)
###################################################################################################
_DYNAMIC_WORKSET_DEFAULTNAME:CONNECTExample

%if defined (_DYNAMIC_WORKAREAROOT_NAME) && exists ($(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKAREAROOT_NAME).cfg)
_USTN_WORKSETCFG=$(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKAREAROOT_NAME).cfg
_USTN_WORKSETNAME=$(_DYNAMIC_WORKAREAROOT_NAME)
%elif exists ($(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKSET_DEFAULTNAME).cfg)
_USTN_WORKSETCFG=$(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKSET_DEFAULTNAME).cfg
_USTN_WORKSETNAME=$(_DYNAMIC_WORKSET_DEFAULTNAME)
%else
%error $(_DYNAMIC_MSG_NOT_FOUND) WORKSET CFG: $(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKAREAROOT_NAME).cfg or $(_DYNAMIC_WORKSET_DEFAULTNAME).cfg
%endif

%lock _USTN_WORKSETNAME
%lock _USTN_WORKSETCFG


###################################################################################################
# 4-WORKSET ROOT
#--------------------------------------------------------------------------------------------------
# Set the location for each WorkSet CFG and WorkSet DGNWS
# (see WorkSpacePWSetup_Predefined_Example_Scenarios.txt)
###################################################################################################


##### Define Worksets Root relative to a WORKAREA
%if defined (_DYNAMIC_WORKAREAROOT)
##### EDIT: Match path relative to WorkArea Root
#_DYNAMIC_WORKAREA_WORKSET_PATH : ContractDrawings/
_DYNAMIC_WORKAREA_WORKSET_PATH :

%if exists ($(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_WORKSET_PATH))
_DYNAMIC_WORKAREA_WORKSET_ROOT:$(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_WORKSET_PATH)
%else
##### EDIT: Disable this error message if Workset Root might not be in WorkArea
%error $(_DYNAMIC_MSG_NOT_FOUND) _DYNAMIC_WORKAREA_WORKSET_PATH: $(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_WORKSET_PATH)
%endif
%endif

_DYNAMIC_WORKAREA_WORKSET_ROOT:$(_DYNAMIC_CEWORKSPACEROOT)WorkSets/$(_USTN_WORKSETNAME)/

_USTN_WORKSETROOT: $(_DYNAMIC_WORKAREA_WORKSET_ROOT)
%lock _USTN_WORKSETROOT


###################################################################################################
# 5-WORKSET DGNWS
#--------------------------------------------------------------------------------------------------
# Set the location for each WorkSet CFG and WorkSet DGNWS
# (see WorkSpacePWSetup_Predefined_Example_Scenarios.txt)
###################################################################################################


_USTN_WORKSETSDGNWSROOT : $(_USTN_WORKSETSROOT)
#_USTN_WORKSETDGNWS=$(_DYNAMIC_WORKAREA)$(_DYNAMIC_ROLE).dgnws


###################################################################################################
# 6-OTHER SPECIFIC CONFIGURATIONS
#--------------------------------------------------------------------------------------------------
# For the specific WorkSpace, you may need to set some variables here
# to properly load the entire WorkSpace successfully
###################################################################################################