cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding extra features to Where Used Tab.

Adding extra features to Where Used Tab.

In the “Where Used” Tab in WTPart we require the following:

1. Require an extra column which would specify the current State in which the WTObject is in

.2. Require an option by which the data can be exported into an excel file. [JZ] Supported in Windchill 10.2 M030

Duplicate with Display LifeCycle State in "Where used" tab.

3 Comments
bmr
17-Peridot
17-Peridot

Since 10.2 M030 you are able to export the "result" to an excel or csv file. But it's still not possible to add some extra attributes like state or different language names, etc. With the table view "All Revisions" it's not possible to show all values of the different versions. But it should be possible to add some attributes for the "Latest" table view.

At the moment you have two options.

  1. You could add a new table view with customizing. This is explained in the customizing guide or https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS17140
  2. You could create a where used report. This one is also attached in the above link.
dbalaganskiy
3-Visitor

I found and option to add a coulmn to TableColumnDefinition for Where Used table programmatically:

		public static Object findTableViewDescriptorByID(String id) {
			QuerySpec qs;
			try {
				qs = new QuerySpec(TableViewDescriptor.class);
				qs.appendWhere(new SearchCondition(TableViewDescriptor.class, TableViewDescriptor.NAME, SearchCondition.EQUAL,	id));
				QueryResult qr = PersistenceHelper.manager.find(qs);
				if (qr.hasMoreElements())
					return qr.nextElement();
			} catch (WTException e) {
				e.printStackTrace();
			}
			return null;
		}



	    com.ptc.core.htmlcomp.tableview.TableViewDescriptor tvd = null;
	    tvd = (TableViewDescriptor) findTableViewDescriptorByID("com.ptc.windchill.enterprise.object.whereUsedResource.2");
// also domify this one:
// tvd = (TableViewDescriptor) findTableViewDescriptorByID("com.ptc.windchill.enterprise.object.whereUsedResource.3"); vector.add(TableColumnDefinition.newTableColumnDefinition("number", true)); vector.add(TableColumnDefinition.newTableColumnDefinition("IBA|ОБОЗНАЧЕНИЕ", true)); vector.add(TableColumnDefinition.newTableColumnDefinition("name", false)); vector.add(TableColumnDefinition.newTableColumnDefinition("orgid", true)); vector.add(TableColumnDefinition.newTableColumnDefinition("groupedVersions", false)); vector.add(TableColumnDefinition.newTableColumnDefinition("containerName", false)); tvd.setTableColumnDefinition(vector); tvd = (TableViewDescriptor)PersistenceHelper.manager.modify(tvd);

Snap270.jpg

dbalaganskiy
3-Visitor

Also I modified those classes to proceed additional IBA attributes:

 

WhereUsedTableView.java

https://cloud.mail.ru/public/NAGG/aUFbxj36E

 

WhereUsedTreeBuilder.java

https://cloud.mail.ru/public/AcYE/2Hg2PeNky