WorkSpacePWSetup_Predefined_XXXX_V8.cfg


###################################################################################################
#
# Name: WorkSpacePWSetup_Predefined_XXXX_V8.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-02-18 correct .pcf extension
# - 2021-04-12 corrected Project Root and CFG exists statements
# - 2021-05-14 Adjusted Dynamic Name logic
# - 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)
# - 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_V8.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- PROJECT LOCATIONS
#--------------------------------------------------------------------------------------------------
# Set the location for each Project CFG
# (see WorkSpacePWSetup_Predefined_Example_Scenarios.txt)
###################################################################################################

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

%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 Projects 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_V8WORKSPACEROOT)Projects/

_USTN_PROJECTSROOT: $(_DYNAMIC_WORKAREA_CFG_ROOT)

%lock _USTN_PROJECTSROOT
_USTN_PROJECT : $(_USTN_PROJECTSROOT)
%lock _USTN_PROJECT


###################################################################################################
# 3-PROJECT CFG
#--------------------------------------------------------------------------------------------------
# Set the location for each Project pcf
# (see WorkSpacePWSetup_Predefined_Example_Scenarios.txt)
###################################################################################################
_DYNAMIC_PROJECT_DEFAULTNAME:CONNECTExample

%if defined (_DYNAMIC_WORKAREAROOT_NAME) && exists ($(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKAREAROOT_NAME).cfg)
_USTN_PROJECTCFG=$(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKAREAROOT_NAME).pcf
_USTN_PROJECTNAME=$(_DYNAMIC_WORKAREAROOT_NAME)
%elif exists ($(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_PROJECT_DEFAULTNAME).cfg)
_USTN_PROJECTCFG=$(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_PROJECT_DEFAULTNAME).pcf
_USTN_PROJECTNAME=$(_DYNAMIC_PROJECT_DEFAULTNAME)
%else
%error $(_DYNAMIC_MSG_NOT_FOUND) PROJECT PCF: $(_DYNAMIC_WORKAREA_CFG_ROOT)$(_DYNAMIC_WORKAREAROOT_NAME).cfg or $(_DYNAMIC_PROJECT_DEFAULTNAME).cfg
%endif

%lock _USTN_PROJECTNAME
%lock _USTN_PROJECTCFG


###################################################################################################
# 4-PROJECT ROOT
#--------------------------------------------------------------------------------------------------
# Set the location for each Project PCF CFG
# (see WorkSpacePWSetup_Predefined_Example_Scenarios.txt)
###################################################################################################


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

%if exists ($(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_PROJECT_PATH))
_DYNAMIC_WORKAREA_PROJECT_ROOT:$(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_PROJECT_PATH)
%else
##### EDIT: Disable this error message if Project Root might not be in WorkArea
%error $(_DYNAMIC_MSG_NOT_FOUND) _DYNAMIC_WORKAREA_PROJECT_PATH: $(_DYNAMIC_WORKAREAROOT)$(_DYNAMIC_WORKAREA_PROJECT_PATH)
%endif
%endif

_DYNAMIC_WORKAREA_PROJECT_ROOT:$(_DYNAMIC_CEWORKSPACEROOT)Projects/$(_USTN_PROJECTNAME)/

_USTN_PROJECTDATA: $(_DYNAMIC_WORKAREA_WORKSET_ROOT)
%lock _USTN_PROJECTDATA

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