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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Automatically stop auxiliary application after run in Java Free

WK_9857356
5-Regular Member

Automatically stop auxiliary application after run in Java Free

Currently I run my code by clicking auxiliary application -> start, and after running I have to click stop.

Although this does not affect the functionality of my code even if I do not click stop, is there a way to stop the aux app somehow in the stop method? Just to save a click

 

public static void start () {
    do_something();
}
public static void stop () {
}

 

 

ACCEPTED SOLUTION

Accepted Solutions
sjuraj
15-Moonstone
(To:WK_9857356)

try to run this via session.RunMacro()

 

~ Command `ProCmdUtilAux` ;
~ Select `aux_apps` `AppList` 1 `<name_of_your_app>`;
~ Activate `aux_apps` `StopBtn`;
~ Activate `aux_apps` `CloseBtn`;

 

from your application

View solution in original post

5 REPLIES 5
sjuraj
15-Moonstone
(To:WK_9857356)

try to create macro and run it from your app to stop itself

Take a look at pfcJLink.JLinkApplication.Stop

WK_9857356
5-Regular Member
(To:YaroslavSin)

This looks like what I'm looking for, although going through the API documentation I don't see how to call the currently running JLinkApplication object upon which to apply the stop method? Any chance that you have a code snippet for reference?

sjuraj
15-Moonstone
(To:WK_9857356)

try to run this via session.RunMacro()

 

~ Command `ProCmdUtilAux` ;
~ Select `aux_apps` `AppList` 1 `<name_of_your_app>`;
~ Activate `aux_apps` `StopBtn`;
~ Activate `aux_apps` `CloseBtn`;

 

from your application

WK_9857356
5-Regular Member
(To:sjuraj)

works perfectly, thanks!

Announcements


Top Tags