<?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: JS API pfcUICommand.Designate in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1030867#M14432</link>
    <description>&lt;P&gt;Message file has to be placen not into %&lt;STRONG&gt;PRO_DIRECTORY&lt;/STRONG&gt;%&lt;STRONG&gt;\&lt;/STRONG&gt;text but&amp;nbsp; %&lt;STRONG&gt;PRO_DIRECTORY&lt;/STRONG&gt;%&lt;STRONG&gt;\&lt;/STRONG&gt;text&lt;STRONG&gt;\&lt;/STRONG&gt;%&lt;STRONG&gt;YOUR_LANGUAGE&lt;/STRONG&gt;%&lt;BR /&gt;&lt;BR /&gt;In my case it was &lt;STRONG&gt;usascii&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Whole path than looked like&amp;nbsp;&lt;STRONG&gt;C:\Applic\Creo_11.0.3.0\Common_Files\text\usascii&lt;BR /&gt;&lt;BR /&gt;also for icon not text file but text\resource&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Whole path than looked like&lt;STRONG&gt; C:\Applic\Creo_11.0.3.0\Common_Files\text\resource&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Aug 2025 12:14:04 GMT</pubDate>
    <dc:creator>ilyachaban</dc:creator>
    <dc:date>2025-08-25T12:14:04Z</dc:date>
    <item>
      <title>JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029210#M14399</link>
      <description>&lt;P&gt;Hello, i've been tryign ot designate created command in PTC Creo JS API and didn't succed at all.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Creo API can't find message file. I've been also trying to create absolute path to message file but it didn't work too.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is my code example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// 1) Get the active Creo session
var session = pfcGetCurrentSession();

// 2) Unique id for your command (make it unique per run while testing)
var COMMAND_NAME = "MyJsSampleCommand_" + (new Date().getTime());

// 3) Implement the action listener
var actionListener = pfcUICommandActionListener.create({
  OnCommand: function (commandId) {
    print("Hello from " + COMMAND_NAME + "!");
  },
  OnCommandEnable: function (commandId) {
    return pfcCommandStatus.pfcCommandStatus_Enabled;
  }
});

// 4) Create the UI command
var uiCmd = session.UICreateCommand(COMMAND_NAME, actionListener);

// 5) Designate it so it can be placed in Screen Customization
uiCmd.Designate(
  "message.txt",  // Message file
  "MyCmdLabel",      // Label key from ui_message.txt
  "MyCmdHelp",       // Help key (or null)
  "MyCmdDesc"        // Description key (or null)
);

// 6) (Optional) Assign an icon
// uiCmd.SetIcon("my_cmd_icon.gif");&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Screenshot from support.ptc.com no directory described:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ilyachaban_0-1755079505570.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/126961i7C2724684DE90B8F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ilyachaban_0-1755079505570.png" alt="ilyachaban_0-1755079505570.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;screenshot from pdf no directory described:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ilyachaban_1-1755079643301.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/126965i2962B7CFEB06FED7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ilyachaban_1-1755079643301.png" alt="ilyachaban_1-1755079643301.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is also no format and description about how does this file has to look like.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is how it looks like when i run it via DevTools&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ilyachaban_0-1755079802508.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/126966i56F47B343CAAB948/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ilyachaban_0-1755079802508.png" alt="ilyachaban_0-1755079802508.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 10:10:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029210#M14399</guid>
      <dc:creator>ilyachaban</dc:creator>
      <dc:date>2025-08-13T10:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029222#M14400</link>
      <description>&lt;P&gt;Make sure you have properly setup your text folder, next see your message.txt file, this is referenced in your code. There are a couple of examples, but you have to deal with message id’s due to different language environments.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 11:21:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029222#M14400</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2025-08-13T11:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029354#M14403</link>
      <description>&lt;P&gt;Tell me please where is this text folder or how can i find it&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2025 05:59:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029354#M14403</guid>
      <dc:creator>ilyachaban</dc:creator>
      <dc:date>2025-08-14T05:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029371#M14404</link>
      <description>&lt;P&gt;Sorry, for me Java and JS are not the right tool, due to much code writing, so I can’t really help for JS. &amp;nbsp;I use Toolkit. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The doc is telling about a message file, and your code is using two of them. In toolkit you specify the text folder in the registry file protk.dat or creotk.dat. You need to check the PTC documentation for one example. I guess in JS it is similar, and you need to map your string token in the given message file.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2025 07:30:26 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029371#M14404</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2025-08-14T07:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029528#M14408</link>
      <description>&lt;P&gt;Here some note from the tk manual. Note: Using message.txt may dangerous &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":dizzy_face:"&gt;😵&lt;/span&gt;‍&lt;span class="lia-unicode-emoji" title=":dizzy:"&gt;💫&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_0033.jpeg" style="width: 770px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/127079i49D87FDCEF2A89B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMG_0033.jpeg" alt="IMG_0033.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2025 21:29:19 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1029528#M14408</guid>
      <dc:creator>RPN</dc:creator>
      <dc:date>2025-08-14T21:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1030211#M14421</link>
      <description>&lt;P&gt;Hello &lt;SPAN style="color:var(--ck-color-mention-text);"&gt;&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/314946"&gt;@ilyachaban&lt;/a&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;,&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/JS-API-pfcUICommand-Designate/m-p/1029528#M14408" target="_blank"&gt;responses&lt;/A&gt; from a community member. 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>Wed, 20 Aug 2025 11:53:14 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1030211#M14421</guid>
      <dc:creator>vnamboodheri</dc:creator>
      <dc:date>2025-08-20T11:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1030599#M14424</link>
      <description>&lt;P&gt;Web.Link User’s Guide. Accessing the Creo Parametric Interface:&lt;/P&gt;
&lt;P&gt;Remember that Web.Link applications, as unregistered web pages, do not&lt;BR /&gt;currently support setting of the Creo Parametric text directory. All the resource&lt;BR /&gt;files for messages must be located under $PRO_DIRECTORY/text folder.&lt;BR /&gt;You can force Creo Parametric to load a message file by registering a Creo&lt;BR /&gt;TOOLKIT or J-Link application via the web page, and calling a function or&lt;BR /&gt;method that requires the message file. Once the file has been loaded by Creo&lt;BR /&gt;Parametric, Web.Link applications may use any of its keystrings for displaying&lt;BR /&gt;messages in the message window.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 05:04:43 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1030599#M14424</guid>
      <dc:creator>YaroslavSin</dc:creator>
      <dc:date>2025-08-22T05:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: JS API pfcUICommand.Designate</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1030867#M14432</link>
      <description>&lt;P&gt;Message file has to be placen not into %&lt;STRONG&gt;PRO_DIRECTORY&lt;/STRONG&gt;%&lt;STRONG&gt;\&lt;/STRONG&gt;text but&amp;nbsp; %&lt;STRONG&gt;PRO_DIRECTORY&lt;/STRONG&gt;%&lt;STRONG&gt;\&lt;/STRONG&gt;text&lt;STRONG&gt;\&lt;/STRONG&gt;%&lt;STRONG&gt;YOUR_LANGUAGE&lt;/STRONG&gt;%&lt;BR /&gt;&lt;BR /&gt;In my case it was &lt;STRONG&gt;usascii&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Whole path than looked like&amp;nbsp;&lt;STRONG&gt;C:\Applic\Creo_11.0.3.0\Common_Files\text\usascii&lt;BR /&gt;&lt;BR /&gt;also for icon not text file but text\resource&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Whole path than looked like&lt;STRONG&gt; C:\Applic\Creo_11.0.3.0\Common_Files\text\resource&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 12:14:04 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/JS-API-pfcUICommand-Designate/m-p/1030867#M14432</guid>
      <dc:creator>ilyachaban</dc:creator>
      <dc:date>2025-08-25T12:14:04Z</dc:date>
    </item>
  </channel>
</rss>

