<?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: How to rename buttons in the UI using Add-inn's in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12143298#M3141</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you for your input. That would be a nice quick fix, but it would probably need to be done every time via the "text commands" whereas if we did it through an add-in, it should be one click to rename all. And also, you can have the add-in run on startup or disable it if you would like to turn it off and revert to the original state.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2023 07:32:44 GMT</pubDate>
    <dc:creator>gerrieYAQRA</dc:creator>
    <dc:date>2023-08-02T07:32:44Z</dc:date>
    <item>
      <title>How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12137947#M3135</link>
      <description>&lt;P&gt;I am trying to rename the existing buttons to something else. Lets say - rename the sketch button to "Begin Teken" which means "start drawing" in another language. I have been going through&amp;nbsp;&lt;A href="https://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/%E2%80%9C#IconsForCommands%E2%80%9D" target="_blank" rel="noopener"&gt;User-Interface Customization&lt;/A&gt;&amp;nbsp;articles and command articles to find the command/code to do the changes but nothing has exactly what I am looking for. Am I missing something?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is what I have gone through already:&lt;BR /&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-F31C76F0-8C74-4343-904C-68FDA9BB8B4C" target="_blank" rel="noopener"&gt;UI Customization&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051" target="_blank" rel="noopener"&gt;Commands&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And even &lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-DF32F126-366B-45C0-88B0-CEB46F5A9BE8" target="_blank" rel="noopener"&gt;Python Templates&lt;/A&gt;&lt;/P&gt;&lt;P&gt;These are quite lengthy and take a lot of time to understand/execute. This doesn't mention how to change existing code to display what I would like it to.. in the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 09:32:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12137947#M3135</guid>
      <dc:creator>gerrieYAQRA</dc:creator>
      <dc:date>2023-07-31T09:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12140341#M3136</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13413612"&gt;@gerrieYAQRA&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is probably not possible to rename the native command button (ToolbarControl).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead, we have created a sample add-in that hides the native sketch command and adds a new "Begin Teken" command.&lt;BR /&gt;When the "Begin Teken" command is executed, the native sketch command is executed.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;#FusionAPI_python addin

import traceback
import adsk.core
import adsk.fusion

_app = adsk.core.Application.cast(None)
_ui  = adsk.core.UserInterface.cast(None)
_handlers = []

_cmdInfo = {
    "id": "Begin Teken",
    "name": "Begin Teken",
    "tooltip": "Begin Teken",
    }

_toolBarInfo = {
    "workspace": "FusionSolidEnvironment",
    "tab": "SolidTab",
    "panel": "SolidCreatePanel"
}


def run(context):
    try:
        global _app, _ui
        _app = adsk.core.Application.get()
        _ui = _app.userInterface

        cmdDefs: adsk.core.CommandDefinitions = _ui.commandDefinitions

        global _cmdInfo
        cmdDef: adsk.core.CommandDefinition = cmdDefs.itemById(
            _cmdInfo["id"]
        )

        if cmdDef:
            cmdDef.deleteMe()

        sktCmdDef: adsk.core.CommandDefinition = get_create_sketch_command_definition()

        cmdDef = cmdDefs.addButtonDefinition(
            _cmdInfo["id"],
            _cmdInfo["name"],
            _cmdInfo["tooltip"],
            sktCmdDef.resourceFolder,
        )

        onCommandCreated = CommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        _handlers.append(onCommandCreated)

        global _toolBarInfo
        ws: adsk.core.Workspace = _ui.workspaces.itemById(
            _toolBarInfo["workspace"]
        )

        tab: adsk.core.ToolbarTab = ws.toolbarTabs.itemById(
            _toolBarInfo["tab"]
        )

        panel: adsk.core.ToolbarPanel = tab.toolbarPanels.itemById(
            _toolBarInfo["panel"]
        )

        cmdControl: adsk.core.ToolbarControl= panel.controls.addCommand(
            cmdDef,
            sktCmdDef.id,
            False
        )
        cmdControl.isVisible = True
        cmdControl.isPromoted = True

        sktCmdControl: adsk.core.ToolbarControl = panel.controls.itemById(
            sktCmdDef.id
        )
        sktCmdControl.isVisible = False
        sktCmdControl.isPromoted = False

    except:
        if _ui:
            _ui.messageBox("Failed:\n{}".format(traceback.format_exc()))


def stop(context):
    try:
        global _toolBarInfo
        ws: adsk.core.Workspace = _ui.workspaces.itemById(
            _toolBarInfo["workspace"]
        )

        tab: adsk.core.ToolbarTab = ws.toolbarTabs.itemById(
            _toolBarInfo["tab"]
        )

        panel: adsk.core.ToolbarPanel = tab.toolbarPanels.itemById(
            _toolBarInfo["panel"]
        )

        global _cmdInfo
        if panel:
            panel.controls.itemById(_cmdInfo["id"]).deleteMe()

        cmdDefs: adsk.core.CommandDefinitions = _ui.commandDefinitions
        cmdDef: adsk.core.CommandDefinition = cmdDefs.itemById(_cmdInfo["id"])
        if cmdDef:
            cmdDef.deleteMe()

        sktCmdDef: adsk.core.CommandDefinition = get_create_sketch_command_definition()
        sktCmdControl: adsk.core.ToolbarControl = panel.controls.itemById(
            sktCmdDef.id
        )
        sktCmdControl.isVisible = True
        sktCmdControl.isPromoted = True

    except:
        print("Failed:\n{}".format(traceback.format_exc()))


def get_create_sketch_command_definition() -&amp;gt; adsk.core.CommandDefinition:

    app: adsk.core.Application = adsk.core.Application.get()
    ui: adsk.core.UserInterface = app.userInterface

    cmdDefs: adsk.core.CommandDefinitions = ui.commandDefinitions
    return cmdDefs.itemById(
        "SketchCreate"
    )


class CommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            sktCmdDef: adsk.core.CommandDefinition = get_create_sketch_command_definition()
            sktCmdDef.execute()
        except:
            if _ui:
                _ui.messageBox("Failed:\n{}".format(traceback.format_exc()))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 556px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1247573i1FF9DF8ED5D401B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this can be confusing for users.&lt;BR /&gt;It would be more user-friendly to create a tab for your add-in and place the necessary commands as shown in this add-in.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/AutodeskFusion360/Fusion360DevTools" target="_blank" rel="noopener"&gt;https://github.com/AutodeskFusion360/Fusion360DevTools&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 06:00:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12140341#M3136</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-08-01T06:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12140392#M3137</link>
      <description>&lt;P&gt;Hi Kandennti-san,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the assist and interest.&lt;/P&gt;&lt;P&gt;I think this is great, thanks for the info. Before I mark this as the solution, would you kindly let me know how you know this would be (ToolbarControl) we needed to address?&lt;/P&gt;&lt;P&gt;If I can have a list of what each section is called, it would help a lot. If I have touched base on this on the previous articles, please let me know as this is all still new and needs to sink in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated!!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 06:36:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12140392#M3137</guid>
      <dc:creator>gerrieYAQRA</dc:creator>
      <dc:date>2023-08-01T06:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12140558#M3138</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13413612"&gt;@gerrieYAQRA&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sample is easy to understand.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 08:11:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12140558#M3138</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-08-01T08:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12142362#M3139</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;&amp;nbsp;-&amp;nbsp;this post is being edited to remove PII.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3787950"&gt;@kandennti&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also set the name of the command definition with the following sentence:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;adsk.core.Application.get().userInterface.commandDefinitions.itemById("SketchCreate").name = "Begin Teken"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the following image when I did it from the Text Commands panel without the need of a add-in:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="wtallerdemadera_0-1690922904590.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1247945iBF115B18D399027C/image-size/large?v=v2&amp;amp;px=999" role="button" title="wtallerdemadera_0-1690922904590.png" alt="wtallerdemadera_0-1690922904590.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could it be a solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Jorge Jaramillo&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 15:00:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12142362#M3139</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2023-08-14T15:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12142882#M3140</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much. I had not noticed that.&lt;BR /&gt;This method is much easier.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 02:39:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12142882#M3140</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-08-02T02:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12143298#M3141</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you for your input. That would be a nice quick fix, but it would probably need to be done every time via the "text commands" whereas if we did it through an add-in, it should be one click to rename all. And also, you can have the add-in run on startup or disable it if you would like to turn it off and revert to the original state.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 07:32:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12143298#M3141</guid>
      <dc:creator>gerrieYAQRA</dc:creator>
      <dc:date>2023-08-02T07:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename buttons in the UI using Add-inn's</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12143915#M3142</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;&amp;nbsp;-&amp;nbsp;this post is being edited to remove PII.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;The line of code I post is not a text command. It is python code, which you can include in any script/add-id. I did it that way just to show how easy it is to execute single instructions from there without the need of a script.&lt;BR /&gt;&lt;BR /&gt;You can create an add-in which run on start-up to rename the buttons names you want every time Fusion 360 starts.&lt;BR /&gt;To revert to the original state you have to add the code to rename them back in the stop method, or to disable the add-in and restart Fusion 360; either way will work.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jorge Jaramillo&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 14:59:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-rename-buttons-in-the-ui-using-add-inn-s/m-p/12143915#M3142</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2023-08-14T14:59:23Z</dc:date>
    </item>
  </channel>
</rss>

