<?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 Re: Running a macro via Java Object Toolkit in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045545#M14637</link>
    <description>&lt;P&gt;If I understand correctly macroA is a mapkey and macroB is a trail file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it looks like the Java Object Toolkit method does not get the hand back.&lt;/P&gt;
&lt;P&gt;The following article suggests to activate the window before firing the trail file :&amp;nbsp;&lt;A href="https://www.ptc.com/en/support/article/CS129591" target="_blank"&gt;https://www.ptc.com/en/support/article/CS129591&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Dec 2025 12:32:56 GMT</pubDate>
    <dc:creator>remy</dc:creator>
    <dc:date>2025-12-01T12:32:56Z</dc:date>
    <item>
      <title>Running a macro via Java Object Toolkit</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045499#M14636</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;We use Creo10.0. and Java Object Toolkit to run a macroA:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;~ Command `ProCmdUtilTrailTrain`
&amp;lt; 2 0.118519 178 0 0 100 1920 0 0 1080 13
~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`
~ Select `file_open` `Ph_list.Filelist` 1 `macroB.txt`
~ Command `ProFileSelPushOpen_Standard@context_dlg_open_cmd`&lt;/LI-CODE&gt;&lt;P&gt;It should call another macro - macroB.txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we run macroA manually in Creo using "Play Trail File" it works fine.&lt;BR /&gt;When we run it using Java Object Toolkit - RunMacro method, it opens the dialog but the last step - clicking the "Open" button - is not performed. If we watch it in the UI and click the Open button manually, it correctly calls macroB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any hint.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2025 09:48:10 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045499#M14636</guid>
      <dc:creator>JD_10306057</dc:creator>
      <dc:date>2025-12-01T09:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Running a macro via Java Object Toolkit</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045545#M14637</link>
      <description>&lt;P&gt;If I understand correctly macroA is a mapkey and macroB is a trail file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it looks like the Java Object Toolkit method does not get the hand back.&lt;/P&gt;
&lt;P&gt;The following article suggests to activate the window before firing the trail file :&amp;nbsp;&lt;A href="https://www.ptc.com/en/support/article/CS129591" target="_blank"&gt;https://www.ptc.com/en/support/article/CS129591&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2025 12:32:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045545#M14637</guid>
      <dc:creator>remy</dc:creator>
      <dc:date>2025-12-01T12:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Running a macro via Java Object Toolkit</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045667#M14639</link>
      <description>&lt;P&gt;Both are trail files.&lt;/P&gt;&lt;P&gt;We want to run them from Java on a backend server.&lt;/P&gt;&lt;P&gt;I tried the advice from the linked article but it didn't help. Also it is for older Creo version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2025 08:00:02 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045667#M14639</guid>
      <dc:creator>JD_10306057</dc:creator>
      <dc:date>2025-12-02T08:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Running a macro via Java Object Toolkit</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045810#M14640</link>
      <description>&lt;P&gt;No idea if this helps, but you can start Creo with a trail file, maybe you can reverse the task, and later pick the application button within the trail.&lt;/P&gt;
&lt;P&gt;And in async mode you can fire mapkeys, but for a long sequence you may have other issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to give the control back to Creo, else it is recursive/nested. Check to do the trail task with Toolkit &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Or first run the app calls, save, and after then run a separate trail file session, it is all a hack!.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do all the stuff via mapkeys as well, this mapkey can be loaded on start via the config file and can be call via '%', but I guess you know that. But a mapkey could be able to close a toolkit button call. On top you can load a config file with toolkit, to setup mapkeys and call them later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would not run a nested trail file, I would prepare them to run one after the other. Trail files have no status, they work or crash, mapkeys NOT and they can be nested. You can write lines (with Toolkit) to the trail file to watch your asyn process as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also setup a parameter marker in your model, this may help if the same button is pressed more than one time to continue with the next step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;, all my 2 Cents!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2025 15:52:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1045810#M14640</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2025-12-02T15:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running a macro via Java Object Toolkit</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1046000#M14641</link>
      <description>&lt;P&gt;Other options:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Quit the asyn session and reconnect later (This may help with the event loop)&lt;/LI&gt;
&lt;LI&gt;Fire the mapkey by active the creo window and "emulate the mapkey entering, like a user would do, you send the char one by one". But in this case I'm not sure how to do this if the window is not visible.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;BTW: What is the result if you do this in a different stack order, so the trail file will fire a mapkey?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 14:58:26 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1046000#M14641</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2025-12-03T14:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Running a macro via Java Object Toolkit</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1046628#M14657</link>
      <description>&lt;P&gt;Hello &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/1014200"&gt;@JD_10306057&lt;/a&gt;&lt;/SPAN&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you have some &lt;A href="https://community.ptc.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1046000#M14641" target="_blank"&gt;responses&lt;/A&gt; from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Vivek N.&lt;BR /&gt;Community Moderation Team.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 10:23:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1046628#M14657</guid>
      <dc:creator>vnamboodheri</dc:creator>
      <dc:date>2025-12-08T10:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running a macro via Java Object Toolkit</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1047179#M14660</link>
      <description>&lt;P&gt;Thank you for the extensive answer. I'm busy on another issue and get back to this one hopefully soon.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 08:17:40 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Running-a-macro-via-Java-Object-Toolkit/m-p/1047179#M14660</guid>
      <dc:creator>JD_10306057</dc:creator>
      <dc:date>2025-12-11T08:17:40Z</dc:date>
    </item>
  </channel>
</rss>

