Editing the Delegate
Windchill provides a server-side delegate that can be used to insert parameters into a SOLIDWORKS part upon download. This mechanism can be used to pass information from the server to SOLIDWORKS, where it can be used like any other SOLIDWORKS parameter (for example, to place information on drawing forms). Parameters beginning with PTC or PROI are regarded as reserved system parameters and cannot be propagated by the customization. If they are added in the customization, they are ignored by the download service.
* 
The customized parameters are provided to the client upon download and are not updated in the CAD application session after a Windchill operation (for example, check in). For example, if a customized parameter is assigned the value of the CAD document number, its value is provided to the client upon download. If the CAD document is later renumbered, the value in the SOLIDWORKS session or the client cache is not automatically updated. The Windchill service delegate mechanism is used to allow the customization.
The following steps explain the customization process:
1. Create a Java class that implements the interface ModeledAttributesDelegate. The interface definition is as follows:
package com.ptc.windchill.uwgm.proesrv.c11n;



import java.util.Collection;

import java.util.HashMap;



import wt.util.WTException;



public interface ModeledAttributesDelegate

{

// getAvailableAttributes() returns

// HashMap<String, Object> which contains

// HashMap<Attribute name, Attribute type>

HashMap getAvailableAttributes();



// getModeledAttributes(Collection docs) returns

// HashMap<input object, HashMap<Attribute name,

Attribute value>>

HashMap getModeledAttributes(Collection docs)

throws WTException;

}

Please see a sample implementation located at:
<Windchill home>/codebase/com/ptc/windchill/uwgm/proesrv/c11n/

DefaultModeledAttributesDelegate.java
2. Edit the site.xconf file (found in <Windchill>) to add the following property to indicate availability of customization service on the server:
<Service context="default"

name="com.ptc.windchill.uwgm.proesrv.c11n.ModeledAttributesDelegate"

targetFile="codebase/service.properties">

<Option cardinality="singleton"

requestor="java.lang.Object"

serviceClass="com.ptc.windchill.uwgm.proesrv.c11n.DefaultModeled

AttributesDelegate"/>

</Service>
Use the path of your class in place of value of serviceClass (that is, replace
com.ptc.windchill.uwgm.proesrv.c11n.Default

ModeledAttributesDelegate
with the path to your class)
3. Then use the xconfmanager tool to apply the changes to service.properties file.
Runxconfmanager -p
4. Restart Windchill.
Was this helpful?