Skip to main content
10-Marble
Feb 18, 2021 8:32 AM UTC
Solved

Run Async Jlink App on CREO startup

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

10-Marble
Mar 2, 2021 8:49 AM UTC

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!

6 replies

15-Moonstone
Feb 18, 2021 8:48 AM UTC

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.

Translate
10-Marble
Feb 18, 2021 2:00 PM UTC

@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

Translate
RPN
18-Opal
Feb 23, 2021 6:39 PM UTC

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.

Translate
17-Peridot
Feb 24, 2021 12:07 PM UTC

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

Translate
hamzawaseem10-MarbleAuthorAnswer
10-Marble
Mar 2, 2021 8:49 AM UTC

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!

Translate