From the API reference guide:
When the running journal or program finishes, the system will attempt to switch into the target application.
The current application does not change immediately.
In general, switching the application during execution of your code isn't necessary. What exactly are you trying to accomplish?
p.s. a better forum to ask this type of question in is the NX customization and programming forum.
I am creating drawing template and title block through .dll and after completing the process it is remain in Modeling workbench.
After that I want to use some parameter of the drafting but due to Modeling workbench i am not able to use that.
So for that i am switching to drafting application.
And I am switching to application in the end after compliting all the process.