I'm using Intralink 3.4 and trying to run a series of where-used reports in a script and save them to a file. Originally I had been writing each report to a file and going back later to remove all the header information - not a very clean way to do it. I am trying to change it to use getSelectedObjects to assign the results to a variable, then write the variable to a file. The problem is that I need certain fields to show in the file and when I use getSelectedObjects, all that is returned is the part name. Part of the code is below. Is there a way to use getSelectedObjects and then manipulate the item to show the desired fields?
IL.deselectAll( "PIV" );
IL.select( "PIV", line2 );
IL.openWindow( "WhereUsedReport", "", "" ); // generate where-used report
IL.openWindow( "TableConfig", "", "" ); // open table config window
IL.setTableConfiguration( "<current>" );
IL.removeAllVisibleColumns( );
IL.addVisibleColumn( "Name" );
IL.addVisibleColumn( "Description*" );
IL.addVisibleColumn( "Revision" );
IL.addVisibleColumn( "Release Level" );
IL.removeAllSortableColumns( );
IL.clearFilter( );
IL.addFilter( "Type Name", "=", new Object[]{"Drawing" } ); // keep drw only
IL.ok( );
IL.setCriteriaFlag( 0 ); // keep latest version only
IL.selectAll( "PIV");
Object workobjects[] = IL.getSelectedObjects ( "PIV" );
if (workobjects.length != 0)
{
fullname = workobjects[0].toString();
out.write( fullname );
out.newLine();
JOptionPane.showMessageDialog(null, "Object = " + fullname,"OK",JOptionPane.INFORMATION_MESSAGE);
}
//IL.printContent( "Where_Used_Report.txt", 1 ); // print to text file
IL.closeWindow( ); // close where-used window
IL.deselectAll( "PIV" );
IL.select( "PIV", line2 );
IL.openWindow( "WhereUsedReport", "", "" ); // generate where-used report
IL.openWindow( "TableConfig", "", "" ); // open table config window
IL.setTableConfiguration( "<current>" );
IL.removeAllVisibleColumns( );
IL.addVisibleColumn( "Name" );
IL.addVisibleColumn( "Description*" );
IL.addVisibleColumn( "Revision" );
IL.addVisibleColumn( "Release Level" );
IL.removeAllSortableColumns( );
IL.clearFilter( );
IL.addFilter( "Type Name", "=", new Object[]{"Drawing" } ); // keep drw only
IL.ok( );
IL.setCriteriaFlag( 0 ); // keep latest version only
IL.selectAll( "PIV");
Object workobjects[] = IL.getSelectedObjects ( "PIV" );
if (workobjects.length != 0)
{
fullname = workobjects[0].toString();
out.write( fullname );
out.newLine();
JOptionPane.showMessageDialog(null, "Object = " + fullname,"OK",JOptionPane.INFORMATION_MESSAGE);
}
//IL.printContent( "Where_Used_Report.txt", 1 ); // print to text file
IL.closeWindow( ); // close where-used window