Skip to main content
4-Participant
June 14, 2022
Solved

UI action listener

  • June 14, 2022
  • 2 replies
  • 2568 views

Good morning everybody,

I'm trying to create a Java Toolkit application that is fired when the user push a specific button of the UI ( Parameter )

Any hint?

 

Thanks in advance

Best answer by remy

Right so you need to use bracket command ie the listener of an existing command.

When you search OnAfterCommand in our knowledge base you will find this article that pretty much summarize how to use it: https://www.ptc.com/en/support/article/cs145364 

The article yields the process (that's two-fold too):

  1. Register the listener
  2. Create the listener

it points to examples shipped with Creo at location: <creo_jlink_loadpoint>/jlink_appls/jlinkexamples

 

and this is the page in the documentation: 

 

remy_0-1655272599061.png

 

2 replies

21-Topaz I
June 14, 2022

Hi you need to get started in creating a button with JOTK.

 

In the Technical Support Knowledge base you can rely on this article : https://www.ptc.com/en/support/article/cs128866 that disclose some code.

 

In a nutshell, the process is two-fold:

  1. create the button
  2. designate it

Also have a look to the User guide page 99 (Creo 8):

remy_0-1655217742223.png

 or search "UICreateCommand" that's the Create method. 

June 14, 2022

pfcCommand.UICommandBracketListener.OnAfterCommand

remy21-Topaz IAnswer
21-Topaz I
June 15, 2022

Right so you need to use bracket command ie the listener of an existing command.

When you search OnAfterCommand in our knowledge base you will find this article that pretty much summarize how to use it: https://www.ptc.com/en/support/article/cs145364 

The article yields the process (that's two-fold too):

  1. Register the listener
  2. Create the listener

it points to examples shipped with Creo at location: <creo_jlink_loadpoint>/jlink_appls/jlinkexamples

 

and this is the page in the documentation: 

 

remy_0-1655272599061.png

 

4-Participant
June 15, 2022

Thanks @remy for your hint.

I tested right now, I found the command name on the trail file : "ProCmdMmParams" and following the example inside pfcCommandExamples.java I reach my point.

THANK you very much!

Have a nice day.!