Here is the code you can use:
Note a potential security risks of putting a password into the code, but it is still a valid techinque for developers to use.
It will work client and server side.
This tutorial show how to use Ant to update the Windchill PDMLink or ProjectLink menu system. It will include a script that will install and uninstall a new menu option to the WTPart actions menu.
We have some requirements
- Fully automated script
- Will work on any 9.x Windchill version
- Will both install and uninstall the option
- No manual editing
First you need to be familiar with how to create a Ant script for Windchill. We will use the same techniques here, but the primary difference is that will need to automatically update XML, this is not a feature available with ootb Ant
For us to update the XML we will use .an ant extension from the OOPS Consultancy Ltd called XML Task that can be downloaded here. It uses a query language called XPath with is very powerful way of specifying locations in an XML document.. You should be familiar with XPath syntax if you do any XML coding, a good starting point is the wiki page
To add the menu we will need to do the following
- Update the actions xmls
- Add a new resource bundle
Add the new XML task to the script
We need to copy the new task jar to our ant lib directory
The we start the script, add the new task
<taskdef name="xmltask classname="com.oopsconsultancy.xmltask.ant.XmlTask" />
Add the new XML task to the script
To be continued… please add a comment if you want us to finish this article sooner rather than later
A presentation showing how excel can “pull” data directly from Windchill, to provide sophisticated reporting.
Click here for the presentation
A presentation showing how to config netbeans to compile code in the Windchill codebase.
Click here for the presentation
- Simple repeatable method to install
- Install many version on the same machine
- Manage multiple installation with one database instance
- Manage the database, snapshots, importing etc.
This is a simple guide to install a Windchill system for developers. It is a well used method that is easy to follow and works. It is not to be used for any production system.
- Install and setup a database
- Download and create a staging area
- Install PDMLink™/ProjectLink™ etc.
Install and setup a database
If you do not have a database already available you will need to install it.
Windchill supports Oracle and SQL Server. You can use Oracle Express Edition XE which is free and very easy to install.
Please note cognos does not support Oracle XE
This guide will asume you use Oracle XE. One database can support many Windchill installations each will have a specifc user.
Install Oracle XE
You can use the standard settings, it is very quick to install unlike the full 10g or 11g. You can use these if you wish you can just select the standard settings.
You can download a version here
Create the Windchill tablespaces
Using sqlplus login as system and create the Windchill tablespaces using the following commands.
create tablespace blobs datafile ‘C:\oraclexe\oradata\XE\BLOBS.DBF’ size 200m;
create tablespace indx datafile ‘C:\oraclexe\oradata\XE\INDX.DBF’ size 1000m;
create tablespace wcaudit datafile ‘C:\oraclexe\oradata\XE\WCAUDIT.DBF’ size 1000m;
We set the initial size to quite small but you may want it to be larger, or put autoextend on. Clearly you may want to store the data somewhere else.
Create a db user for this installation
Create your user to be used by the install, you can find an easy to use script in any existing Windchill installation.
Select a good name for your user e.g. wind91mysystem and then select TEMP and USERS as the temporary and users tablespaces
You can let the install create your user but it will insist on a properly configured database e,g, multi character set, whereas developers may choose to install a basic database setup. Creating your own user avoids the install getting “fussy” about this.
Note that you can run many Windchill installations on the same database as long as they have different users.
Create a staging area
A staging area is a location on your hard disk where all the installation CDs are downloaded. They must retain their original (rather obtuse) directory names. You can have the more than one version in the same staging area. It should look something like this :
You can use a tool like download them all to get all the CDs
Run the Windchill installer
Next run the Windchill installer, select the 702 CD you want and execute the setup.vbs
Select the advanced option
Select your product, e.g. PDMLink, note you can install ProjectLink in addition later.
Chose the following options, we are going to use the database user created earlier
Note that if this is a second installation you can share the original Windchill Directory Server server and do not need to re-install it.
Choose the location to install
Note that we are using a fake subst drive w:, this allows us to swap between installation without changing the startup icons or IDE settings. However if you want to share the Directory Server you must first install on a real drive.
Select your data set
Note that the JCA examples “carambola” are hard coded to use the demo dataset.
Setup the webserver settings, make sure you do not have the port already used (skype is a favorite user of port 80).
Note that we are using a fake hostname “beauty.ptc.com” which is setup in our host file, we always use the same one so that we can copy databases and installation between machines
Sometimes port 80 is blocked, common causes of this are apache running and skype. If you are unsure use a utility such as netstat to check which process is using the port
Next is the database setup, note the user name we setup earlier
Now the Directory Server
Note that we have to have a different paths if we are sharing a common server
And now the password data, always create a new one as we have a unique LDAP path
And now select the staging area
The install should take between 30min and 2 hours.
Once complete you have a working Windchill system.
Possible Installation Problems
Alot of checks are done during the above entries but install can and do fail. Don’t panic, look at the logs and see what it says.
Here are some favorite reasons
- Database is full – check the tablespaces
- Port already in use – use netstat -a
- Disk is full – free some space
Installing Windchill on Windows 7 can be problematic. The 64bit version appears to work but the 32bit version needs some changes.
- Look in the install files and find the setup.exe
- Change the exectuble to be compatible to Windows Vista (Service Pack 2)
- You must do this on all install files