Hi
I'm trying to create a "Menu" with JLINK and I can not.
Two errors:
1 - Do not create the menu;
2 - Lock the Creo.
code:
import javax.swing.JOptionPane;
import com.ptc.pfc.pfcGlobal.pfcGlobal;
import com.ptc.pfc.pfcSession.Session;
public class helloworld {
public static void start() {
//JOptionPane.showMessageDialog(null,"Test!!!!");
try {
Session curSession = pfcGlobal.GetProESession();
curSession.UIAddMenu("MENUNAME", "Utilities", "MenuFile.txt", null);
}catch(Exception err) {
JOptionPane.showMessageDialog(null, err.toString());
}
}
public static void stop() {
//System.exit(0);
}
}
Archive MenuFile.txt
Menu
Jlink-Menu
#
#
USER Button
Test1
#
#
USER Message
Test2
#
#
Archive protk.dat
name helloworld
startup java
java_app_classpath D:\Local\JlinkHelloWord.jar
java_app_class helloworld
java_app_start start
java_app_stop stop
allow_stop true
delay_start true
text_dir D:\Local\text
end
grateful
I'm trying to create a "Menu" with JLINK and I can not.
Two errors:
1 - Do not create the menu;
2 - Lock the Creo.
code:
import javax.swing.JOptionPane;
import com.ptc.pfc.pfcGlobal.pfcGlobal;
import com.ptc.pfc.pfcSession.Session;
public class helloworld {
public static void start() {
//JOptionPane.showMessageDialog(null,"Test!!!!");
try {
Session curSession = pfcGlobal.GetProESession();
curSession.UIAddMenu("MENUNAME", "Utilities", "MenuFile.txt", null);
}catch(Exception err) {
JOptionPane.showMessageDialog(null, err.toString());
}
}
public static void stop() {
//System.exit(0);
}
}
Archive MenuFile.txt
Menu
Jlink-Menu
#
#
USER Button
Test1
#
#
USER Message
Test2
#
#
Archive protk.dat
name helloworld
startup java
java_app_classpath D:\Local\JlinkHelloWord.jar
java_app_class helloworld
java_app_start start
java_app_stop stop
allow_stop true
delay_start true
text_dir D:\Local\text
end
grateful