属性の同期化
Creo CADDS 5 と Windchill の間で属性データを同期化できます。事前に適切に設定していれば、同期化はバックグラウンドで実行されます。設定は、コンフィギュレーションファイルを作成し、caddsrclocal ファイル内にそのファイルへのポインタを作成して行います。
ポインタの作成
テキストエディタで caddsrclocal ファイルを開き、次の行を追加します。
setenv WWGM_ATTR_CONFIG “</path/to/file>”
</path/to/file> は、作成するファイルのフルパス名です (例: /users/shelly/project/attrconfig)。
コンフィギュレーションファイルの作成
コンフィギュレーションファイルは CSV (コンマ区切り値) ファイルです。ファイルの各行が 1 つの属性に適用される内容を表します。次の表に一般的な説明をまとめます。
タイプ
|
指定
|
マッピングされた属性
|
フラグ
|
適用方向
|
1. Tnode テキストデータ
2. キーワード
3. PPE の部品プロパティ
|
プロパティ 1 の名前
|
プロパティ 1 の値
|
プロパティ 2 の名前
|
プロパティ 2 の値
|
Windchill での属性名
|
0 = 図面
1 = 部品
|
0 = Creo CADDS 5 から Windchill へ
1 = Windchill から Creo CADDS 5 へ
2 = 両方向
|
次に、一般的な 1 行を示します。
1,DWGOBJATTR,10001,DWGOBJIDX,1,VENDOR,0,1
値
|
説明
|
1
|
Tnode テキストデータ
|
DWGOBJATTR
|
現在のデータがソースまたは宛先として関連付けられている図面エンティティのプロパティ名。指定したプロパティが Creo CADDS 5 プロパティファイルで適切なプロパティタイプ (flag/ integer/ float/ string) になっていることを確認する必要があります。
|
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