Synchronizing Attributes (CADDS 5)
You can synchronize attribute data between Creo CADDS 5 and Windchill. Synchronization occurs behind the scenes, provided that you properly configure beforehand. Configuration consists of creating a configuration file, then creating a pointer to that file in the caddsrclocal file.
Creating The Pointer
Open the caddsrclocal file in a text editor and add the following line:
setenv WWGM_ATTR_CONFIG “</path/to/file>”
</path/to/file> is the full path name of the file to be created (example: /users/shelly/project/attrconfig)
Creating The Configuration File
The configuration file is a CSV (Comma Separated Value) file. Each line in the file represents the propagation of a single attribute. This table provides a general description.
Type
|
Designation
|
Mapped Attribute Name
|
Flag
|
Propagation Direction
|
1. Tnode text data
2. Keyword
3. Part property on PPE
|
Prop 1 Name
|
Prop 1 Value
|
Prop 2 Name
|
Prop 2 Value
|
Name of attribute in Windchill
|
0=Drawing
1=Part
|
0 = Creo CADDS 5 to Windchill
1 = Windchill to Creo CADDS 5
2 = Both directions
|
A typical line looks like this:
1,DWGOBJATTR,10001,DWGOBJIDX,1,VENDOR,0,1
Value
|
Description
|
1
|
Tnode text data
|
DWGOBJATTR
|
Property name on the drawing entity with which current data is associated as source or destination. You must ensure that the specified property is available in the Creo CADDS 5 property file with the proper type (flag/ integer/ float/ string).
|
10001
|
Value associated with DWGOBJATTR.
|
DWGOBJIDX
|
Another property name on the same drawing entity.
|
1
|
Value associated with DWGOBJIDX
|
VENDOR
|
The attribute name in Windchill.
|
0
|
The attribute is associated with a drawing.
|
1
|
Attribute will be propagated from Windchill to Creo CADDS 5.
|
Sample Configuration File
**** 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