<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Run Async Jlink App on CREO startup in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/713740#M10157</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;So, is there any way I can register the async app globally so whenever CREO is started, my app is started along.&lt;BR /&gt;Please respond!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 18 Feb 2021 08:32:52 GMT</pubDate>
    <dc:creator>hamzawaseem</dc:creator>
    <dc:date>2021-02-18T08:32:52Z</dc:date>
    <item>
      <title>Run Async Jlink App on CREO startup</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/713740#M10157</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;So, is there any way I can register the async app globally so whenever CREO is started, my app is started along.&lt;BR /&gt;Please respond!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 08:32:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/713740#M10157</guid>
      <dc:creator>hamzawaseem</dc:creator>
      <dc:date>2021-02-18T08:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Run Async Jlink App on CREO startup</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/713745#M10158</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 08:48:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/713745#M10158</guid>
      <dc:creator>sjuraj</dc:creator>
      <dc:date>2021-02-18T08:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Run Async Jlink App on CREO startup</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/713831#M10162</link>
      <description>&lt;P&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/201132"&gt;@sjuraj&lt;/a&gt;&amp;nbsp; 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&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;connection = pfcAsyncConnection.AsyncConnection_Start(proECommand, proETextPath);&lt;BR /&gt;connection.AddActionListener((AsyncActionListener) this);&lt;/P&gt;
&lt;P&gt;curSession = connection.GetSession();&lt;BR /&gt;createMenuButtons();&lt;BR /&gt;&lt;BR /&gt;Is there anyway I can connect to already opened CREO, so my ultimate goal would be,&lt;BR /&gt;User starts CREO from where ever, my async app is started along, and app connects to CREO. I hope that makes sense.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 14:00:21 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/713831#M10162</guid>
      <dc:creator>hamzawaseem</dc:creator>
      <dc:date>2021-02-18T14:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Run Async Jlink App on CREO startup</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/714930#M10165</link>
      <description>&lt;P&gt;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 &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;, and you have 2 event loops.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 18:39:00 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/714930#M10165</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2021-02-23T18:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run Async Jlink App on CREO startup</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/715128#M10166</link>
      <description>&lt;P&gt;You need to develop synchronous app. The app will be started with Creo. You can register the app in Creo using protk.dat file.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 12:07:29 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/715128#M10166</guid>
      <dc:creator>YaroslavSin</dc:creator>
      <dc:date>2021-02-24T12:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Run Async Jlink App on CREO startup</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/715932#M10167</link>
      <description>&lt;P&gt;from documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="method-title" border="0" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="method-title"&gt;&lt;A target="_blank" name="AsyncConnection::ConnectById"&gt;&lt;/A&gt;AsyncConnection_ConnectById&lt;/TH&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="method_def" border="0" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="return-type"&gt;&lt;TT&gt;static&amp;nbsp;&lt;A class="type" href="https://www.ptcusercommunity.com/c-pfcAsyncConnection-AsyncConnection.html" target="_blank" rel="noopener"&gt;AsyncConnection&lt;/A&gt;&lt;/TT&gt;&lt;/TD&gt;
&lt;TD class="method-name"&gt;&lt;TT&gt;AsyncConnection_ConnectById&lt;/TT&gt;&lt;/TD&gt;
&lt;TD class="method-params"&gt;&lt;TT&gt;(&lt;A class="type" href="https://www.ptcusercommunity.com/c-pfcAsyncConnection-ConnectionId.html" target="_blank" rel="noopener"&gt;ConnectionId&lt;/A&gt;&amp;nbsp;Id, /*optional*/ String&amp;nbsp;TextPath, /*optional*/ Integer&amp;nbsp;TimeoutSec)&lt;/TT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE class="method-doc" border="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;TT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/TT&gt;&lt;/TD&gt;
&lt;TD&gt;Connects to a specific Creo Parametric session by passing the identification string.&lt;BR /&gt;&lt;BR /&gt;The ID string for a given session can be obtained from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;TT&gt;&lt;A class="method" href="https://www.ptcusercommunity.com/c-pfcAsyncConnection-AsyncConnection.html#GetConnectionId" target="_blank" rel="noopener"&gt;AsyncConnection.GetConnectionId()&lt;/A&gt;&lt;/TT&gt;.
&lt;P&gt;The application may only connect to one Creo Parametric session at any time.&lt;/P&gt;
&lt;BR /&gt;
&lt;DL&gt;
&lt;DT&gt;&lt;STRONG&gt;Manual References:&lt;/STRONG&gt;&lt;/DT&gt;
&lt;DD&gt;&lt;A href="https://www.ptcusercommunity.com/../manual0/JAsync.html#18" target="_blank" rel="noopener"&gt;Running J-Link Applications in Asynchronous Mode: Connecting Via Connection ID&lt;/A&gt;&lt;/DD&gt;
&lt;/DL&gt;
&lt;DL&gt;
&lt;DT&gt;&lt;STRONG&gt;Parameters:&lt;/STRONG&gt;&lt;/DT&gt;
&lt;DD&gt;
&lt;DL&gt;
&lt;DT&gt;&lt;TT&gt;&lt;STRONG&gt;Id&lt;/STRONG&gt;&lt;/TT&gt;&lt;/DT&gt;
&lt;DD&gt;The connection id string previously obtained for the Creo Parametric session you wish to connect to.&lt;/DD&gt;
&lt;DT&gt;&lt;TT&gt;&lt;STRONG&gt;TextPath&lt;/STRONG&gt;&lt;/TT&gt;&lt;/DT&gt;
&lt;DD&gt;The path under which the message and menu files are held. If no external messaging or menus are needed pass&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;TT&gt;null&lt;/TT&gt;.&lt;/DD&gt;
&lt;DT&gt;&lt;TT&gt;&lt;STRONG&gt;TimeoutSec&lt;/STRONG&gt;&lt;/TT&gt;&lt;/DT&gt;
&lt;DD&gt;The time, in seconds, to wait for Creo Parametric to respond to the connection request. Pass&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;TT&gt;null&lt;/TT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to use the default timeout.&lt;/DD&gt;
&lt;/DL&gt;
&lt;/DD&gt;
&lt;/DL&gt;
&lt;DL&gt;
&lt;DT&gt;&lt;STRONG&gt;Returns:&lt;/STRONG&gt;&lt;/DT&gt;
&lt;DD&gt;Object representing the asynchronous connection.&lt;/DD&gt;
&lt;/DL&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Connection ID can be extracted from Session object: BaseSession.&lt;A class="method" href="#ConnectionId" target="_blank"&gt;GetConnectionId&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 09:18:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/715932#M10167</guid>
      <dc:creator>sjuraj</dc:creator>
      <dc:date>2021-03-01T09:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run Async Jlink App on CREO startup</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/716262#M10173</link>
      <description>&lt;P&gt;Thank you everyone, your help directed me to optimum solution.&lt;/P&gt;
&lt;P&gt;For starting my app I used "Parametric Start File" parametric.psf, placed this command at the end of file:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;RUN="NameOfJarFile.jar"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Where jar file was placed in same folder as psf file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For my other problem with connection,&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/201132"&gt;@sjuraj&lt;/a&gt; I used the connect method instead of start&lt;BR /&gt;&lt;BR /&gt;pfcAsyncConnection.AsyncConnection_Connect(null, null, proETextPath, 1000);&lt;BR /&gt;connection = pfcAsyncConnection.AsyncConnection_GetActiveConnection();&lt;BR /&gt;&lt;BR /&gt;Now it's all sorted out, thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:50:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Run-Async-Jlink-App-on-CREO-startup/m-p/716262#M10173</guid>
      <dc:creator>hamzawaseem</dc:creator>
      <dc:date>2021-03-02T08:50:28Z</dc:date>
    </item>
  </channel>
</rss>

