管理首选项 > Creo View 首选项的概览
  
Creo View 首选项的概览
本节包含了可为 Creo View 设置的首选项类型的概览。还提供了锁定首选项的相关信息。
首选项类型
有五种类型的首选项。每种类型均可从 XML 文件中读取:
类型
文件名
位置
默认
ProductView_prefs.xml
从安装目录的 <Creo View>\preferences\ProductView\ 子目录中读取。
* 
首选项样本文件位于 <Creo View>\resources\ProductView\preferences\ProductView_pref.xml
服务器
server_prefs.xml
Windchill 服务器上下文层次结构的 WVS 配置下载。仅当连接到 Windchill 时,服务器首选项才可用。
已共享
shared_pref.xml
从共享位置下载到安装目录的 <Creo View>\preferences\ProductView\shared_prefs 子目录。启用后,共享首选项文件会自动更新。仅当未连接到 Windchill 时,共享的首选项文件才处于活动状态。
管理员
admin_prefs.xml
从安装目录的 <Creo View>\preferences\ProductView\ 子目录中读取
用户
user_prefs.xml
从用户的配置文件中读取:
Windows - %APPDATA%/ptc/ProductView/user_prefs.xml
UNIX - $HOME/.ptc/ProductView/user_prefs.xml
文件将按照上述排列顺序处理。可用后续文件中不同的值覆盖首选项文件的值:
用户首选项替换了管理文件中首选项的设置。
管理首选项会替换服务器文件中首选项的设置。如果存在活动的共享首选项文件,则管理首选项会替换共享首选项。
* 
服务器首选项文件和共享首选项文件不能同时存在。
例如,管理员通过定义 admin_prefs.xml 文件中 highlight_using_color 的首选项,禁用颜色突出显示命令,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<preferences>
<category name="General">
<subcategory name="Navigation" >
<preference1 name="highlight_using_color" value="False"/>
</subcategory>
</category>
</preferences>
但是,如果用户在用户界面中明确地启用了相同的首选项,则设置会保存至 user_prefs.xml 文件。因此,会覆盖管理员首选项并启用颜色突出显示命令。为防止用户覆盖管理员首选项,请锁定管理员首选项。有关详细信息,请继续阅读下一节“锁定首选项”。
锁定首选项
您可在任意级别锁定首选项。锁定的首选项无法被较低级的文件修改或覆盖。使用前一节中有关颜色突出显示的示例,可添加属性 locked=”True” 以防止用户更改首选项:
<?xml version="1.0" encoding="utf-8"?>
<preferences>
<category name="General">
<subcategory name="Navigation" >
<preference1 name="highlight_using_color" value="False" locked="True"/>
</subcategory>
</category>
</preferences
颜色突出显示命令现已禁用并锁定。