工作空间配置文件
配置过程的下一步是确定工作空间配置文件。每个工作空间都有一个名为 <工作空间名称>.cfg 的配置文件,该文件必须位于 _USTN_WORKSPACESROOT 指定的目录中。随附提供的 _USTN_WORKSPACESROOT 已定义为 $(_USTN_CONFIGURATION)WorkSpaces/,但您可以按如上所述在 WorkSpaceSetup.cfg 文件中进行更改。
系统将处理且仅处理一个工作空间配置文件。msconfig.cfg 中有一些逻辑。通过设置 _USTN_WORKSPACENAME,这些逻辑可确定要加载的工作空间配置文件。但是,我们目前可以忽略这些逻辑,因为 MicroStation 将保存最近的工作空间名称并使用它来设置 _USTN_WORKSPACENAME。
然后,使用以下构造包括 msconfig.cfg 中的工作空间配置文件:
%if defined (_USTN_WORKSPACENAME) % if exists ($(_USTN_WORKSPACESROOT)$(_USTN_WORKSPACENAME).cfg) _USTN_WORKSPACECFG = $(_USTN_WORKSPACESROOT)$(_USTN_WORKSPACENAME).cfg % include $(_USTN_WORKSPACECFG) level WorkSpace % endif %endif
用户组织会频繁自定义工作空间
配置文件。创建新的工作空间时,需先从模板
工作空间配置文件开始,如下所示:
#---------------------------------------------------------------------- # WorkSpace.Template - Template for new WorkSpaces # # When MicroStation runs, one and only one WorkSpace Configuration File # is chosen and included. # # The function of the WorkSpace Configuration File is to define the location # of _USTN_WORKSPACEROOT, _USTN_WORKSPACESTANDARDS, and/or _USTN_WORKSETSROOT # for this WorkSpace. Those are the root directory, the standards directory, # and the WorkSets root directory, respectively. # # Default locations are defined in msconfig.cfg: # _USTN_WORKSPACEROOT is $(_USTN_WORKSPACESROOT)$(_USTN_WORKSPACENAME)/ # _USTN_WORKSPACESTANDARDS is defined as $(USTN_WORKSPACEROOT)Standards/ # _USTN_WORKSETSROOT is defined as $(USTN_WORKSPACEROOT)WorkSets/ # If those defaults are acceptable, this file need not make any definitions. # To move all WorkSpace data to a separate directory (e.g., to a network share) # _USTN_WORKSPACEROOT can be redefined and the default values retained for # _USTN_WORKSPACESTANDARDS and _USTN_WORKSETSROOT #----------------------------------------------------------------------
正如您所看到的那样,系统可以根据用户要求 重定向工作空间根目录、 标准或工作集根目录的任意组合。
在 msconfig.cfg 中,下一步是
包括 _USTN_WORKSPACEROOT 指定的目录
中存储的任何配置文件。
注释: USTN_WORKSPACESROOT 是
所有工作空间的工作空间配置
文件所在的文件夹。每个工作空间都有一个 _USTN_WORKSPACEROOT 根文件夹存储其数据。
由于这两个配置变量的唯一区别在于复数形式,
因此切勿将其混淆。
#---------------------------------------------------------------------- # When we get to this point, we have a WorkSpace defined. # There may be .cfg files within the WorkSpace. Process those here. #---------------------------------------------------------------------- %if exists ($(_USTN_WORKSPACEROOT)*.cfg) % include $(_USTN_WORKSPACEROOT)*.cfg level WorkSpace %endif
这些配置文件是可选的,且可包含适合 用户工作流的任何配置 变量定义。通常情况下,不需要其他配置文件。MicroStation 随附提供的示例 工作空间没有任何 其他配置文件。