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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

J-Link and Creo UI Editor

JH_9792957
2-Explorer

J-Link and Creo UI Editor

Hello all.

I work with J-Link application for Creo 6 and 7. And I need to create a simple dialog with list of string items and OK/Cancel buttons. Items for list should be generated before loading of dialog. And my idea was to create a dialog by Creo UI Editor, load this dialog during application work and load string data to list on the dialog each time before opening this dialog. But I have problem. I can't even load the simple dialog. Creo just stuck and not responding when I try to call the method which should load the dialog.

What I did:

1. There is a folder of application, called "dialog".

2. This folder contains a few files - protk.dat, DialogBox.jar and "text" folder.

3. "text" folder contains "resource" folder.

4. I created the simple dialog "test" by Creo UI Editor and saved it as "test.res" into "dialog\text\resource" folder.

5. Also I generated the test.java file which contains some initialization code for this dialog.

6. After that I created a simple DialogBox.java file which just contains start and stop methods and call the test dialog creation.

7. At last I compiled DalogBox.jar and add startup info about it to protk.dat file.

 

When I try  to run this DialogBox.jar application in Creo it just freeze all UI. Creo doesn't responde and I should kill his process by Task Manager. It happends when I try to call creation of test dialog into "start" method. If I remove this creation application will be loaded without any problems.

 

What I'm doing wrong? Can I use this logic to create the dialogs for J-Link application? Should I have some additional license to run such dialogs into Creo? Where should I place the .res file? And how can I fix this? Is there some other way to create custom dialogs with custom controls?

 

Please, look at my application in the attached file. Thanks

1 REPLY 1
zemanekp
14-Alexandrite
(To:JH_9792957)

Hi, your example is almost fine. It's work:

 

2021-04-21 16_10_38-Clipboard.png

 

(Only in the real world would the dialog not be called directly when launching the application, but from a button, e.g. command in the Ribbon.)

 

BUT:

  • You have to set the otk_java to protk.dat instead the java , because  dialog comes from com.ptc.uifc  which is related to the PTC Creo Object TOOLKIT.
  • And that's why you also need a license for the PTC Creo Object TOOLKIT. Otherwise you will receive a warning: 2021-04-21 16_16_55-Message.png
  • Unfortunately 🙂

Without License you can work with Ribbons and Menus; it is not possible to create a new GUI thought uifc interface with free J-link.

 

See the details at CS317290.

 

 

PZ

 

 

Announcements


Top Tags