Installation und Upgrade > Installations- und Konfigurationshandbuch > Using the PTC Solution Installer > Installing Windchill Solutions > Optional Product Settings > Creo Packages > Creo Packages
  
Creo Packages
This section explains how to configure Creo Packages with the Windchill server. The following procedures are contained in this section:
Create Attributes (optional procedure)
Discourage modification of imported packages on the Windchill server (optional procedure).
Register Creo Packages service on the Windchill server (only necessary when Windchill ProjectLink is installed with Windchill PDMLink).
Manually Loading Data and Database Schema
Create Attributes
After you have installed Creo Packages, you can optionally configure attributes in Windchill to show the source system name and source object version of imported objects. These attributes are:
SOURCE_PDMSYSTEM_NAME—Shows the name of the source Windchill system.
SOURCEVERSION—Shows the version of the object on the source Windchill system. The source and target versions are different if the source and target Windchill systems use different versioning schemes. For example, the version could be 1.10 on the source system and A.1 on the target system.
AWindchill Site or Organization administrator can create these attributes.
1. Log on to Windchill as a Site or Organization administrator.
2. Go to Sites > Utilities > Type and Attribute Management > Manage Reusable Attributes .
3. From the Attribute Root list, create or choose an Attribute Organizer and create the SOURCE_PDMSYSTEM_NAME attribute with a data type string.
a. Enter SOURCE_PDMSYSTEM_NAME (all upper case and no spaces) in the Name field.
b. If desired, enter a unique description (all upper case and no spaces) in the Description field.
c. Enter a display name (all upper case and no spaces) in the Display Name field.
d. Enter a hierarchy display name (all upper case and no spaces) in the Hierarchy Display Name field.
e. If desired, enter an internal name (all upper case and no spaces) in the Internal Name field.
f. The data type is grayed out with the string type in the Data Type field.
g. Select File > Save to create the SOURCE_PDMSYSTEM_NAME attribute.
4. From the Attribute Root list, create the SOURCEVERSION attribute with a data type String.
a. Enter SOURCEVERSION (all upper case and no spaces) in the Name field.
b. If desired, enter a unique description (all upper case and no spaces) in the Description field.
c. Enter a display name (all upper case and no spaces) in the Display Name field.
d. Enter a hierarchy display name (all upper case and no spaces) in the Hierarchy Display Name field.
e. If desired, enter an internal name(all upper case and no spaces) in the Internal Name field.
f. The data type is grayed out with the string type in the Data Type field.
g. Select File > Save to create the SOURCEVERSION attribute.
5. Go to Manage Types > EPM Document Master > CAD Document Master
a. From the page of CAD Document Master go to Action > Edit.
b. Add the SOURCE_PDMSYSTEM_NAME attribute and select Type as Global.
6. Go to Manage Types > EPM Document > CAD Document
a. From the page of CAD Document go to Action > Edit.
b. Add the SOURCEVERSION attribute and select Type as Global
and set Properties
c. Add the SOURCE_PDMSYSTEM_NAME as Type Alias and Data Type as String.
d. It is required to map the EPM Document Master attribute (SOURCE_PDMSYSTEM_NAME) on layouts.
e. On Set Property page add mapping property for SOURCE_PDMSYSTEM_NAME: MBA|masterReference^WCTYPE|wt.epm.EPMDocumentMaster|com.ptc.ptcnet.DefaultEPMDocumentMaster~IBA|SOURCE_PDMSYSTEM_NAME.
f. If you want to display SOURCEVERSION and SOURCE_PDM_SYSTEM_NAME on information pages from the CAD Document page, select the desired Layouts tab.
g. Add the attribute to the layout that you want it displayed in and Save it.
Discourage Modification of Imported Packages on the Windchill Server
Creo Packages supports the exchange of Creo data from a source Windchill system to target Windchill systems. It is recommended that you do not modify the data in a Windchill target system unless the Windchill target system has ownership of the data. Creo Packages does not inherently enforce or prevent modification of imported data. For information pertaining to the ownership of data, refer to the “Object Ownership Transfer” section in the Getting Started chapter of the Creo Packages Administrator’s and User’s Guide.
You can use the sample code provided on the Creo Packages server CD as a guide in helping to prevent imported objects from getting checked-out or revised on a Windchill server where Windchill PDMLink, or Windchill PDMLink with Windchill ProjectLink is also installed. Refer to the sample WPCServer.zip file located at <WT_HOME>\src\wpcserver\Samples\ on the Creo Packages server CD for the sample .java script, StandardWPCVetroService.java.
A Site or Organization administrator can set the access permissions to read-only for imported data.
Use your HTML software or other third-party software to modify the sample code to meet your access policies for the prevention of non-owned data being imported on target Windchill system[s].
The annotation.jar (or com.ptc.windchill.annotations.metadata.GenAsPersistable ,GeneratedProperty.class) is not in the <WT_HOME>/codebase directory. You can obtain the .jar file from <WT_HOME>/srclib/tools/ directory. You can set the classpath to srclib/tools, or extract the classfile in the codebase directory.
Perform the following procedure to compile the .java file required for Creo Packages service and Veto service.
* 
Refer to the WPCServer.zip file located at <WT_HOME>\src\wpcserver\Samples\ on the Creo Packages software CD for the sample .java script, StandardWPCVetroService.java.
1. Open the Windchill shell and navigate to the <WT_HOME> \src\wpcserver directory.
2. Enter the following command to create a new directory structure under <WT_HOME>\src\wpcserver\cust\service.
javac -g -d. Samples/WPC_Server/src/cust/service/*.java
3. Copy the /cust folder to <WT_HOME\codebase>.
4. Navigate to Windchill/bin and enter the following xconf commands to update the Creo Packages wt.properties file, and to register your new service in the codebase with xconfmanager. For example,
xconfmanager -t codebase/wt.properties-swt.services.service.5010=cust.service.WPCVetoService/cust.service.StandardWPCVetoService -p
5. Restart the Windchill server.
* 
Refer to the Windchill Customizer’s Guide for more details on creating non-modelled services for listening.
Register the Creo Packages Service on the Windchill Server
If Creo Packages is installed on a Windchill PDMLink database with Windchill ProjectLink, you must register Creo Packages service with the Windchill server.
1. Register Creo Packages service in the codebase with xconfmanager. For example,
xconfmanager -t codebase/wt.properties-swt.services.service.5000 =com.ptc.cwp.wncadapter.server.CWPService/com.ptc.cwp.wncadapter.server.StandardCWPService -p
2. Restart the Windchill server.
* 
Refer to the Windchill Customizer’s Guide for more details on creating non-modelled services for listening.
Manually Loading Data and Database Schema
During the installation using the PSI, you are prompted to select your data loader settings. If you choose not to load data using PSI, you must manually load it after PSI installs your solution using the instructions in the section Database Initializing and Data Loading. However, in certain scenarios additional steps are needed to complete your installation. These scenarios are;
You choose to not automatically create schema and load data when installing using the PSI.
You choose to not automatically create schema and load data when adding to an existing Windchill installation, using the PSI.
Typically these steps are needed to account for customized local attributes.
1. Complete the PSI installation, during which you deselect the options described in Selecting Data Loader Settings.
2. Create the database schema to be used in order for the data to be loaded, as described in Creating the Database Schema.
3. Load your data, as described in Loading Base and Demonstration Data.
4. Open a windchill command window and execute the following script to create the database schema:
Non Multi-byte Installations
windchill --java=%JAVA_HOME%/bin/java.exe --javaargs="
-Dwt.tools.sql.autoCommit=true -Dwt.tools.sql.verbose=6 -Dwt.tools.sql.dbUser=<username>
-Dwt.tools.sql.dbPassword=<password>"
wt.tools.sql.SQLCommandTool %WT_HOME%/db/sql/wpcserver/WPCServer/
Make_module_WPCServer.sql
Multi-byte Installations
windchill --java=%JAVA_HOME%/bin/java.exe --javaargs="
-Dwt.tools.sql.autoCommit=true -Dwt.tools.sql.verbose=6 -Dwt.tools.sql.dbUser=<username>
-Dwt.tools.sql.dbPassword=<password>"
wt.tools.sql.SQLCommandTool %WT_HOME%/db/sql3/wpcserver/WPCServer/
Make_module_WPCServer.sql
* 
Please note the following:
If using an SQL server replace all instances of %WT_HOME%/db/sql with %WT_HOME%/db/sqlServer.
%JAVA_HOME% refers to JDK directory used by Windchill.
%WT_HOME% refers to the Windchill directory.
5. To load data run the following command:
windchill wt.load.WindchillLoader -Application=Windchill.WPCSERVER -Unattended -AbortOnError