Using InfoReport to learn about Windchill objects

PTC includes a useful shell script in the Windchill/bin folder named InfoReport.sh (Unix) or InfoReport.bat (Windows) that can be used to learn about the internal fields and methods of various Windchill objects.

The script uses introspection to interrogate a Java class and create a text file report containing all sorts of useful information.  In some ways, the report is more useful than JavaDocs but it’s not as nicely formatted since its just a flat text file.  It looks like you can also request the data in XML format which might be easier to follow for some of the more complicated classes.

To use the script:

  1. Open a windchill shell on a server by typing ‘windchill shell’
  2. Type: InfoReport.sh <package>.<classname> and hit enter
    1. Example: InfoReport.sh wt.epm.EPMDocument
  3. Check the Windchill/tmp directory for a text file named  <package>.<classname>.out — this file contains all sorts of interesting information about the class that will be useful in using the class in your custom Java code.

Here’s the first few lines of the output file for wt.epm.EPMDocument:

Class                           : wt.introspection.ClassInfo
getDisplayName()                : EPM Document
getDisplayName( "ja_JP" )       : EPM Document
getStandardIcon()               : wt/clients/images/epmdoc.gif
getOpenIcon()                   : wt/clients/images/epmdoc.gif
getClassname()                  : wt.epm.EPMDocument
getBusinessClass()              : class wt.epm.EPMDocument
getConcreteClass()              : class wt.epm.EPMDocument
getSerializableType()           : interface java.io.Externalizable
getExternalizationVersionUID()  : 2481771402836305255
isConcrete()                    : true
isPersistable()                 : true
isRemoveEventParticipant()      : true
getDatastoreElementType()       : DatastoreTable
getParentClassInfo()            : ClassInfo wt.enterprise.RevisionControlled
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s