Synchronisation des attributs
Vous pouvez synchroniser des données d'attribut entre Creo CADDS 5 et Windchill. La synchronisation est exécutée en arrière-plan, à condition que vous l'ayez correctement configurée au préalable. La configuration consiste à créer un fichier de configuration, en créant ensuite un pointeur vers ce fichier dans le fichier caddsrclocal.
Création du pointeur
Ouvrez le fichier caddsrclocal dans un éditeur de texte et ajoutez la ligne suivante :
setenv WWGM_ATTR_CONFIG “</path/to/file>”
</path/to/file> correspond au nom du chemin complet du fichier à créer (exemple : /users/shelly/project/attrconfig)
Création du fichier de configuration
Le fichier de configuration est un fichier CSV (valeurs séparées par une virgule). Chaque ligne du fichier représente la propagation d'un attribut unique. Ce tableau présente une description générale.
Type
|
Désignation
|
Nom d'attribut mappé
|
Indicateur
|
Sens de propagation
|
1. Données de texte Tnode
2. Mot-clé
3. Propriété d'article sur PPE
|
Nom de la propagation 1
|
Valeur de la propagation 1
|
Nom de la propagation 2
|
Valeur de la propagation 2
|
Nom de l'attribut dans Windchill
|
0 = Drawing
1 = Part
|
0 = Creo CADDS 5 vers Windchill
1 = Windchill vers Creo CADDS 5
2 = dans les deux sens
|
Voici à quoi ressemble une ligne type :
1,DWGOBJATTR,10001,DWGOBJIDX,1,VENDOR,0,1
Valeur
|
Description
|
1
|
Données de texte Tnode
|
DWGOBJATTR
|
Nom de la propriété dans l'entité du dessin avec laquelle les données actuelles sont associées en tant que source ou destination. Vous devez vous assurer que la propriété spécifiée est disponible dans le fichier de propriétés Creo CADDS 5 avec le type approprié (indicateur/entier/flottant/chaîne).
|
10001
|
Valeur associée à DWGOBJATTR.
|
DWGOBJIDX
|
Autre nom de propriété sur la même entité de dessin.
|
1
|
Valeur associée à DWGOBJIDX.
|
VENDOR
|
Nom de l'attribut dans Windchill.
|
0
|
L'attribut est associé à un dessin.
|
1
|
L'attribut sera propagé depuis Windchill vers Creo CADDS 5.
|
Exemple de fichier de configuration
**** 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