Skip to main content
10-Marble
February 18, 2021
Solved

Run Async Jlink App on CREO startup

  • February 18, 2021
  • 3 replies
  • 4472 views

Hi everyone,

 

I have successfully developed a jlink Async app for CREO, and it is working perfect. What I need is that whenever I start CREO Parametric the app should be started too. Currently, I need to run the app through Netbeans, and then CREO is started via the code.

So, is there any way I can register the async app globally so whenever CREO is started, my app is started along.
Please respond!


Thanks

Best answer by hamzawaseem

Thank you everyone, your help directed me to optimum solution.

For starting my app I used "Parametric Start File" parametric.psf, placed this command at the end of file:

RUN="NameOfJarFile.jar"

Where jar file was placed in same folder as psf file.

 

For my other problem with connection, @sjuraj I used the connect method instead of start

pfcAsyncConnection.AsyncConnection_Connect(null, null, proETextPath, 1000);
connection = pfcAsyncConnection.AsyncConnection_GetActiveConnection();

Now it's all sorted out, thanks again!

3 replies

15-Moonstone
February 18, 2021

You can create simple synchronou app which starts your async app or use os script in mapkey to start it. I suppose os script can be run in trail file as well. A trail file can be passed to creo as parameter while starting.

10-Marble
February 18, 2021

@sjuraj  Thanks for quick response, and yes I get your idea, now the problem is I start CREO from code, so I assume this will start another instance of CREO, here is the code

connection = pfcAsyncConnection.AsyncConnection_Start(proECommand, proETextPath);
connection.AddActionListener((AsyncActionListener) this);

curSession = connection.GetSession();
createMenuButtons();

Is there anyway I can connect to already opened CREO, so my ultimate goal would be,
User starts CREO from where ever, my async app is started along, and app connects to CREO. I hope that makes sense.
Thanks

RPN
18-Opal
February 23, 2021

I really have no clue about your intention, just modify the psf file to start your Script, this will connect to the first session and later starts the second Session, or vice versa. It may required to make the session ID public, dependent on the order, not sure if the connect is smart enough to ignore his parent. I think you have to deal with this two handles. You may have fun with dead locks 😀, and you have 2 event loops.

17-Peridot
February 24, 2021

You need to develop synchronous app. The app will be started with Creo. You can register the app in Creo using protk.dat file.

hamzawaseem10-MarbleAuthorAnswer
10-Marble
March 2, 2021

Thank you everyone, your help directed me to optimum solution.

For starting my app I used "Parametric Start File" parametric.psf, placed this command at the end of file:

RUN="NameOfJarFile.jar"

Where jar file was placed in same folder as psf file.

 

For my other problem with connection, @sjuraj I used the connect method instead of start

pfcAsyncConnection.AsyncConnection_Connect(null, null, proETextPath, 1000);
connection = pfcAsyncConnection.AsyncConnection_GetActiveConnection();

Now it's all sorted out, thanks again!