与其他应用程序集成 > Windchill Workgroup Manager 文档 > CADDS 5 > 高级技术 > 同步属性
  
同步属性
Creo CADDS 5Windchill 之间同步属性数据。如果事先正确地配置,同步会在后台发生。配置包括创建配置文件,然后在 caddsrclocal 文件中创建指向该文件的指针。
创建指针
在文本编辑器中打开 caddsrclocal 文件并添加下列行:
setenv WWGM_ATTR_CONFIG “</path/to/file>”
</path/to/file> 是将要创建的文件的完整路径名 (例如:/users/shelly/project/attrconfig)
创建配置文件
配置文件为 CSV (以逗号分隔的值) 文件。文件中的每一行都代表一个属性的传播。此表格提供了常规说明。
类型
标识
映射属性名称
标志
传播方向
1. Tnode 文本数据
2. 关键字
3. PPE 中的部件属性
Prop 1 名称
Prop 1 值
Prop 2 名称
Prop 2 值
Windchill 中的属性名称
0 = 绘图
1 = 部件
0 = Creo CADDS 5Windchill
1 = WindchillCreo CADDS 5
2 = 两个方向
典型行如下所示:
1,DWGOBJATTR,10001,DWGOBJIDX,1,VENDOR,0,1
说明
1
Tnode 文本数据
DWGOBJATTR
作为源或目标,与当前数据关联的绘图实体中的属性名称。必须确保指定属性在使用正确类型 (标志/整数/浮点数/字符串) 的 Creo CADDS 5 属性文件中可用。
10001
与 DWGOBJATTR 关联的值。
DWGOBJIDX
在相同绘图实体中的另一个属性名称。
1
与 DWGOBJIDX 关联的值
VENDOR
Windchill 中的属性名称。
0
属性与绘图相关联。
1
属性将从 Windchill 传播至 Creo CADDS 5
示例配置文件
**** The configuration file for bidirectional propagation of Windchill ****
****attributes ****
*
*
Note - All Comments start with the asterisk character
*
*
The file comprises configuration entries. Each entry has the following fields
* with the values they can take in the line that immediately follows the fields
* line. The Fields are:-
*
*-Type-----Prop1---Val1--Prop2--Val2--MappedAttr--Flag-------
PropDir----
* 1 0/1 0/1/2
*
* Alternately the fields could be:
-
*-Type-----Keyword------------------------Placeholder----Placeholder-----MappedAttr---
*
* 2 one of the mass point keywords WC attribute name
*
* Alternately the fields are:-
*-Type-----Prop--------------------------------MappedAttr---------PropDir-------------
* 3 Valid CADDS 5 property name WC attr name 0/1/2
*
* Type = 1 means TExt Tnode, 2 means Keyword , 3 means property on the Part Parameter
* Entity (PPE)
* The Type pretty much dictates what fields are expected further in the entry
*
* Flag =0 means the entry is for Drawing, 1 means for Part
* PropDir=0 means the entry denotes attribute propagation
* from CADDS 5 to Windchill
* =1 means the propagation direction denoted is from Windchill to CADDS 5
* =2 indicates that both directions are meant
* MappedAttr could be either the Windchill user attribute name (IBA name) or the
* CADDS 5 name for the
*
* WC system attribute. For example the CADDS 5 name for the WC system attribute
* PTC_WM_NAME is C5UNAM. These CADDS 5-side property names for system attrs are to be
* found in the default "prop" file that is available in the CADDS 5 installation.
*
* In general, attributes for Drawings can be populated from CADDS 5 to Windchill and
* vice-versa only through the Type=1 entries i.e. Tnode text
* On the other hand, attributes for Parts (Part type of CAD documents) can be populated
* from CADDS 5 to Windchill only via the Type=3 entries (i.e. properties
* on PPE) for general CADDS 5 properties and only via the Type=2 (i.e. Keyword) entries
* for Mass point properties. As of now the only "Keyword" kind of configurations we
* support are for Mass point properties. Part attributes can be propagated from Windchill
* to CADDS 5 through Type=1 or Type=3 entries i.e. on PPE properties and on Model-mode
* Tnode text.
*
* Propagating attributes from Windchill to CADDS 5 on Tnode text is a useful method of
* displaying both user attributes as well as Wndchill system attributes in a CADDS 5 Part
* and Drawings.
*
* For a CADDS 5 Assembly Document, the attribute propagation is done from and to the
* "DEFAULT" adrawing which is part of the assembly's contents. The DEFAULT adrawing is
* treated as a CADDS 5 "Part" for the propagation. The attributes that propagate are
* those for the Assembly document in Windchill.
*
* Again, For an Assembly drawing (ADRAW) the bidirectional attribute propagation behaviour
* is the same as for a CADDS 5 Part type of CAD Document.
*
*-----------------------------------------IMPORTANT------------------------------------
---------------------
*-----------------------------------------IMPORTANT------------------------------------
---------------------
*-----------------------------------------IMPORTANT------------------------------------
---------------------
* For this configuration file to be picked up by CADDS 5, there needs to be a setting
* like setenv WWGM_ATTR_CONFIG '/usr/harry/cadds/bin/attrconf'say, in the .caddsrc or
* .caddsrc-local file,where "attrconf" is the name of the file
*--------------------------------------------------------------------------------------
***************************************************************************************
*****************
*******************END OF GENRAL DESCRIPTION*******************************************
*****************
***************************************************************************************
* EXAMPLE CONFIG ENTRIES ( All entries have a leading asterisk which should be removed
* to make them a valid entry)
*
* The following entry is required if you want to propagate the text value on a
* Drawing-mode "Tnode" entity (also called Drawing-mode nodal text) to a WIndchill user
* attribute called VENDOR
* The IBA is set on the Drawing to which the Tnode entity belongs.
* The Tnode will be identified by 2 CADDS 5 properties called DWGOBJATTR and DWGOBJIDX
* whose values are 1001 and 1 respectively.
* These properties are defined in the default "prop" file that is available in the
* CADDS 5 installation. Any such property can be used to identify the Tnode.
*
*1, DWGOBJATTR, 1001, DWGOBJIDX, 1,VENDOR-IBA,0,0
*
* The following entry is same as above except that the Tnode is identified by
* different values
* for the 2 CADDS 5 properties DWGOBJATTR and DWGOBJIDX, and the direction of
* propagation is bidirectional
*
* 1, DWGOBJATTR, 1003, DWGOBJIDX, 1,VENDOR-IBA,0,2
*
* The following is for a Part (Model-mode) Tnode. Note that for a Part Tnode text, the
* valid direction for propagation for a Tnode text is only from Windchill to CADDS 5
* (i.e. PropDir = 1).
* Note that in the entry the Tnode is identified simply by the existence of a property
* called DWGOBJATTR on it. This is one of the several variations allowed for
* identifying either Draw-mode or Model-mode Tnodes. During runtime any situation where
* multiple Tnodes satisfy this identification, is arbitrarily resolved.
*
*1, DWGOBJATTR, , , , VENDOR-IBA, 1,1
*
* The following entry identifies the Tnode using only the DWGOBJATTR property
and its value
* and propagates the WC system attribute PTC_WM_NUM onto a Drawing's Tnode
*
*1, DWGOBJATTR,
1006,,,C5UNUM, 0, 1
*
* The following 3 entries say that the mass point property "centroid", "area" and
"volume"
* should be propagated to WC attributes, CENTRO, SAREA and PROPERTY2 respectively
*
*2, MPCENTROID, , ,CENTRO
*2, MPSAREA, , ,SAREA
*2, MPVOLUME, , ,PPROPERTY2
*
*The following entry says that the PPE property PROPERTY1 for the CADDS 5 part should
* be propagated to the WC user attribute WC_PROPERTY1
*
*3, PPROPERTY1, WC_PROPERTY1,0