Gestion du contenu > Connexion au serveur PTC Document Bursting > Enabling Windchill Part References
Enabling Windchill Part References
To enable the functionality of searching Windchill Parts and inserting their attribute values into your XML documents, you must have the following configurations in place:
New Burst Configuration Rule
Add a new burst configuration rule as follows:
<referencemetadatarule>
The attributes on the rule are:
Sourcetype: always “text”.
Bndryelemname: The bursting object boundary XML element.
Metadataelemname: Name of the XML element to use for a property assignment rule.
Attrname: Name of the XML attribute to use for a property assignment rule. This is optional: If it is not specified then it goes in the element content.
Reflocationattr: The attribute on the element that will contain the logical ID of the Windchill Part e.g. ‘href’.
Refattributeattr: the attribute that contains the name of the Windchill attribute to retrieve. If this is not specified, then the attribute must be specified in the Metadata attribute of the rule.
Metadata: The Name of the PTC Server Property field shown on the PTC Server's Attribute Definition Manager tab. This is optional if reattributeattr is present. If both refattributeattr and metadata are specified, refattributeattr takes precedence.
For example, consider this rule:
<referencemetadatarule sourcetype="text" bndryelemname="parttopic" metadataelemname="partno" attrname=“refvalue"
reflocationattr="href"refattributeattr="refattr"/>
Example XML:
<partno href="x-wc://part=OR:wt.part.WTPartMaster:234912" refvalue="" refattr=“IntendedUse" />
This will insert the IntendedUse attribute value of the part “234912” into the refvalue attribute.
Using this rule with no attrname attribute:
<referencemetadatarule sourcetype="text" bndryelemname="parttopic" metadataelemname="partno"
reflocationattr="href"refattributeattr="refattr"/>
results in:
<partno href="x-wc://part=OR:wt.part.WTPartMaster:234912" refattr=“IntendedUse" >Intended use value</partno>
where the IntendedUse attribute value on the part “234912” is inserted into the partno element content.
This is an example of burst configuration file rule with the metadata attribute specified as a Windchill attribute:
<referencemetadatarule sourcetype="text" bndryelemname="parttopic" metadataelemname="partno"
reflocationattr="href" refattributeattr="refattr" metadata="WC_NAME_ATTR"/>
When the metadata is specified in the burst configuration file rule, the value of that attribute will be used as a default.
Example XML:
<partno href="x-wc://part=OR:wt.part.WTPartMaster:234912">Part name</partno>
This will insert the WC_NAME_ATTR value into the element content for partno.
System-wide Burst Configuration
In the atidefaults.bcf file, add referencemetadata=”on” to createdefaults.
<createdefaults maxnamelen="72" objectreuse="on" twowaymetadata="on" useroverride="on" referencemetadata="on">
PTC Server Connection Configuration
In the siteprefs.xml, add the following parameter:
<Parameter xmlns="http://www.arbortext.com/namespace/doctypes/appcfg">
<ParameterName>CreatePartReferenceLinks</ParameterName>
<ParameterValue>on</ParameterValue>
</Parameter>
Document Type Configuration in .dcf file
Make sure that an element is set up for part references in the document-type-specific .dcf file. This is set up in the <Specials> section.
Example:
<Specials>
<WindchillPartReference element="partno" ref="href"/>
</WindchillPartReference>
</Specials>
The element attribute indicates which element is the part reference element. The ref attribute indicates which attribute of that element will hold the reference.
Configuration for Publishing
You must update the publishing rule parameters to include worker com.ptc.arbortext.wvs/IncludeModelItemPart. This will enable publishing of the part references. See SamplePublishingRules.xml file.
Configuration for Payload-based Publishing
If you are using payload-based publishing, then you must add the following attributes in the CopyMetadataConfig.xml:
Refattributeattr
, and
Reflocationattr.
Examples of these attributes being used are:
<CopyMetadataConfig version="2.0">
<Boundary doctype="parttopic" root="parttopic">
<Copy refattributeattr="refatt" target="partno" reflocationattr="href"/>
</Boundary>
</CopyMetadataConfig>
<CopyMetadataConfig version="2.0">
<Boundary doctype="parttopic" root="parttopic">
<Copy source="WC_NAME_ATTR" target="partno" reflocationattr="href"/>
</Boundary>
</CopyMetadataConfig>
For more information about CopyMetadataConfig file, see Configuring Two-way Metadata for Document Publishing
Windchill Settings
You must set the Default View for Parts preference in Windchill.
In order to see the tables on Dynamic Document and on Windchill Part, you must add to the action models in Windchill.
Est-ce que cela a été utile ?