Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Way to set default Folder?

doronron1 said:
You could create a script to set the folder automatically for the selected items


By script do you mean a mapkey/macro? If so, how do you do that with IntraLink?
 
It is a combination of recording keystrokes then editing the file to suit your needs. It is not too difficult, just have a look at the examples on the following sites.


http://www.profilesmagazine.com/p39/reddy.html


http://www.profilesmagazine.com/p37/mettes.html


http://www.profilesmagazine.com/p32/mettes.html


http://www.profilesmagazine.com/p29/tips_meadows.html


[url]http://inversionconsulting.blogspot.com/search/label/Intrali nk%20Scripting[/url]


This is what your script would look like


// Version: Intralink v.3.3
// Start Macro Recording
import com.ptc.intralink.client.script.*;
import com.ptc.intralink.script.*;


import java.lang.reflect.*;
import java.io.*;
import javax.swing.*;
public class folder extends ILIntralinkScript {
ILIntralinkScriptInterface IL = (ILIntralinkScriptInterface)getScriptInterface();


private void run0 () throws Exception {
JOptionPane ui = new JOptionPane();

IL.getSelectedObjects ( "WSPI" );
Object myobjects[] = IL.getSelectedObjects ( "WSPI" );


if (myobjects.length != 0) {


IL.getSelectedObjects( "WSPI" );
IL.openWindow( "Modify", "", "" );
IL.selectAll( "NONE" );
IL.setAttribute( "Folder", "folder_name" );
IL.ok( );

}else {
ui.showMessageDialog(null, "No Objects Selected" );
}
} // End of run0


public void run () throws Exception {
run0 (); // recorded
} // End of function


} // End Macro Recording
 
doronron1 said:
It is a combination of recording keystrokes then editing the file to suit your needs. It is not too difficult, just have a look at the examples on the following sites.


http://www.profilesmagazine.com/p39/reddy.html


http://www.profilesmagazine.com/p37/mettes.html


http://www.profilesmagazine.com/p32/mettes.html


http://www.profilesmagazine.com/p29/tips_meadows.html


http://inversionconsulting.blogspot.com/search/label/Intrali nk%20Scripting


This is what your script would look like


// Version: Intralink v.3.3
// Start Macro Recording
import com.ptc.intralink.client.script.*;
import com.ptc.intralink.script.*;


import java.lang.reflect.*;
import java.io.*;
import javax.swing.*;
public class folder extends ILIntralinkScript {
ILIntralinkScriptInterface IL = (ILIntralinkScriptInterface)getScriptInterface();


private void run0 () throws Exception {
JOptionPane ui = new JOptionPane();

IL.getSelectedObjects ( "WSPI" );
Object myobjects[] = IL.getSelectedObjects ( "WSPI" );


if (myobjects.length != 0) {


IL.getSelectedObjects( "WSPI" );
IL.openWindow( "Modify", "", "" );
IL.selectAll( "NONE" );
IL.setAttribute( "Folder", "folder_name" );
IL.ok( );

}else {
ui.showMessageDialog(null, "No Objects Selected" );
}
} // End of run0


public void run () throws Exception {
run0 (); // recorded
} // End of function


} // End Macro Recording





Nice! Thanks for the replies. That'll likely do what I need.
 

Sponsor

Articles From 3DCAD World

Back
Top