<?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: fast rename dont work properly in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12678255#M1812</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thank you...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;unfortunately, the syntax was broken when I wanted to insert my modification into the new code, which for the bore-milling and circular-pocket-milling cycles lists the diameter of the hole instead of the diameter of the tool.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Could you implement my part of the code into yours?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Or rather, to write the code correctly, as it should be.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;95 percent of the time we use Metric threads...we mostly mill G threads (G1/2, G3/4, G1 1/2, etc...).&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;But I don't know how scipt would know if it is G or Metric thread.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Possibly by thread pitch (1.337; 1.814; 2.309 for G threads; other Metric threads)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thank you very much&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Mon, 01 Apr 2024 08:21:07 GMT</pubDate>
    <dc:creator>Tomas_V_cz</dc:creator>
    <dc:date>2024-04-01T08:21:07Z</dc:date>
    <item>
      <title>fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12662153#M1779</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Script zum schnellen umbennen von CAM Operationen&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Bei Rückfragen bitte an M.Toepke wenden&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Marcus.Toepke@gabler-naval.com&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; adsk.core, adsk.fusion, adsk.cam, traceback&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; re&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; sys&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the application and userInterface&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;app &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; adsk.core.Application.get()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ui &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; app.userInterface&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ui_var &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; app.userInterface&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the value of the property.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;propertyValue &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; ui.commandDefinitions&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the active product.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;cam &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; adsk.cam.CAM.cast(app.activeProduct)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Check if anything was returned.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (cam &lt;/SPAN&gt;&lt;SPAN&gt;is&lt;/SPAN&gt; &lt;SPAN&gt;None&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ui.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'Você deve estar na área de trabalho Concluído (CAM)!'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the Setups collection object from the CAM object.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;setups &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; cam.setups&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the first Setup object in the CAM product.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;setup &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; setups.item(&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the Operations collection object that contains all the operations in the setup.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;operations &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; setup.operations&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the first operation in the collection.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;operation &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; operations.item(&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get selected Operations&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;selections &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; ui.activeSelections&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# print(f'Es sind {selections.count} Operationen ausgewählt!')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; a_selections &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; selections.asArray()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; selections.count &lt;/SPAN&gt;&lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'Nenhuma seleção de operação foi feita'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; adsk.terminate()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; selections.count &lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Abfrage Operations Bezeichnungen&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vorgabe &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; a_selections[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].entity.name&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user_input &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; ui_var.inputBox(&lt;/SPAN&gt;&lt;SPAN&gt;"Nome básico da operação"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Qual deve ser o nome básico das operações?"&lt;/SPAN&gt;&lt;SPAN&gt;, vorgabe)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; user_input[&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;]:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'Eingabe wurde abgebrochen'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; adsk.terminate()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;'~'&lt;/SPAN&gt; &lt;SPAN&gt;not&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; number &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; sel_op &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; a_selections:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sel_op.entity.name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;number&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; number &lt;/SPAN&gt;&lt;SPAN&gt;+=&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;'~('&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Input Auseinandernehmen und in Liste umformen&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; re.search(&lt;/SPAN&gt;&lt;SPAN&gt;r&lt;/SPAN&gt;&lt;SPAN&gt;'~&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;$'&lt;/SPAN&gt;&lt;SPAN&gt;, user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; input_list[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; input_list.replace(&lt;/SPAN&gt;&lt;SPAN&gt;'~'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;).replace(&lt;/SPAN&gt;&lt;SPAN&gt;'('&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;).replace(&lt;/SPAN&gt;&lt;SPAN&gt;')'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; input_list.split(&lt;/SPAN&gt;&lt;SPAN&gt;','&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Zusatzargumente aus user_input entfernen&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; extract &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; re.search(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"(.*?)&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;re.escape(&lt;/SPAN&gt;&lt;SPAN&gt;'~'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user_input &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; extract[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user_input &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; user_input.replace(&lt;/SPAN&gt;&lt;SPAN&gt;'~'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;len&lt;/SPAN&gt;&lt;SPAN&gt;(a_selections) &lt;/SPAN&gt;&lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;len&lt;/SPAN&gt;&lt;SPAN&gt;(input_list):&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; sel_op &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; a_selections:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sel_op.entity.name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;user_input&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;input_list[count]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count &lt;/SPAN&gt;&lt;SPAN&gt;+=&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'A lista que você forneceu não corresponde ao número de operações selecionadas! O script terminará agora'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;'~'&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Input Auseinandernehmen und in Liste umformen&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; re.search(&lt;/SPAN&gt;&lt;SPAN&gt;r&lt;/SPAN&gt;&lt;SPAN&gt;'~.&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;$'&lt;/SPAN&gt;&lt;SPAN&gt;, user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; input_list[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; input_list.replace(&lt;/SPAN&gt;&lt;SPAN&gt;'~'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_list &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; input_list.split(&lt;/SPAN&gt;&lt;SPAN&gt;','&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Zusatzargumente aus user_input entfernen&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; extract &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; re.search(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"(.*?)&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;re.escape(&lt;/SPAN&gt;&lt;SPAN&gt;'~'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, user_input[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user_input &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; extract[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user_input &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; user_input.replace(&lt;/SPAN&gt;&lt;SPAN&gt;'~'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_number &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;float&lt;/SPAN&gt;&lt;SPAN&gt;(input_list[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; add_number &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;float&lt;/SPAN&gt;&lt;SPAN&gt;(input_list[&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; sel_op &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; a_selections:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; count &lt;/SPAN&gt;&lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sel_op.entity.name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;user_input&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;new_number&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; count &lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_number &lt;/SPAN&gt;&lt;SPAN&gt;+=&lt;/SPAN&gt;&lt;SPAN&gt; add_number&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sel_op.entity.name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;user_input&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;new_number&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count &lt;/SPAN&gt;&lt;SPAN&gt;+=&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;except&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; err:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; selections.count &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# error_message = f'Es wurde keine Auswahl getroffen!\nEs wurden {selections.count} operationen ausgewählt'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.messageBox(err)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; ui:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ui.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'Failed:&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;{}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;.format(traceback.format_exc()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;i have copied this script, but there is a problem,&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rename everthing but when renumbering, it jumps numbers&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;por example, i input&amp;nbsp; "MOULD"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it appears&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mould_01&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mould_06&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mould_02&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mould_04&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mould_07&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mould_03&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mould_05&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 24 Mar 2024 16:08:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12662153#M1779</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-03-24T16:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12662754#M1780</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14771110"&gt;@nubrandao&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think they are simply processed in the order in which they are selected.&lt;/P&gt;
&lt;P&gt;I have fixed it this way.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;・・・

            if '~' not in user_input[0]:
                number = 1
                # for sel_op in a_selections:
                #     sel_op.entity.name = f'{user_input[0]}_{number}'
                #     number += 1

                opeLst = [s.entity for s in a_selections]

                if isinstance(opeLst[0], adsk.cam.Operation):
                    setup = opeLst[0].parent

                    for ope in setup.operations:
                        if ope in opeLst:
                            ope.name = f'{user_input[0]}_{number}'
                            number += 1
・・・&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;The image on the right is the result of executing the script after selecting in the order of the numbers on the left of the image.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 806px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1341175iE149731133C344A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 02:16:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12662754#M1780</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-25T02:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12663164#M1781</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so the script stopped working after I inserted the new code... I think I put it in a good place (we localized the comments and the output)&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;# Skript pro rychlé přejmenování CAM operací
# V případě dotazů se obraťte na M.Toepke
# Marcus.Toepke@gabler-naval.com

import adsk.core, adsk.fusion, adsk.cam, traceback
import re
import sys

# Získání aplikace a uživatelského rozhraní
app = adsk.core.Application.get()
ui = app.userInterface
ui_var = app.userInterface

# Získání hodnoty vlastnosti.
propertyValue = ui.commandDefinitions

# Získání aktivního produktu.
cam = adsk.cam.CAM.cast(app.activeProduct)

# Kontrola, zda bylo něco vráceno.
if (cam is None):
    ui.messageBox('Musíte být v pracovním prostoru CAM (Fertigen)!')
    
# Získání kolekce nastavení z objektu CAM.
setups = cam.setups

# Získání prvního objektu nastavení v produktu CAM.
setup = setups.item(0)

# Získání kolekce operací, která obsahuje všechny operace v nastavení.
operations = setup.operations

# Získání první operace v kolekci.
operation = operations.item(0)

# Získání vybraných operací
selections = ui.activeSelections
try:
    # print(f'Bylo vybráno {selections.count} operací!')
    a_selections = selections.asArray()
    if selections.count == 0:
        ui.messageBox('Nebyl proveden žádný výběr operací')
        adsk.terminate()
    if selections.count &amp;gt;= 1:
        # Dotaz na názvy operací
        vorgabe = a_selections[0].entity.name
        user_input = ui_var.inputBox("Základní název operace", "Jak má základní název operací znít?", vorgabe)
        if user_input[1]:
            ui.messageBox('Vstup byl zrušen')
            adsk.terminate()

            if '~' not in user_input[0]:
                number = 1
                # for sel_op in a_selections:
                #     sel_op.entity.name = f'{user_input[0]}_{number}'
                #     number += 1

                opeLst = [s.entity for s in a_selections]

                if isinstance(opeLst[0], adsk.cam.Operation):
                    setup = opeLst[0].parent

                    for ope in setup.operations:
                        if ope in opeLst:
                            ope.name = f'{user_input[0]}_{number}'
                            number += 1
                
        if '~(' in user_input[0]:
            # Rozdělení vstupu a převedení do seznamu
            input_list = re.search(r'~(.*)$', user_input[0])
            input_list = input_list[0]
            input_list = input_list.replace('~', '').replace('(', '').replace(')', '')
            input_list = input_list.split(',')
            
            # Odstranění doplňkových argumentů z uživatelského vstupu
            extract = re.search(f"(.*?){re.escape('~')}", user_input[0])
            user_input = extract[0]
            user_input = user_input.replace('~', '')
            
            if len(a_selections) == len(input_list):
                count = 0
                for sel_op in a_selections:
                    sel_op.entity.name = f'{user_input}_{input_list[count]}'
                    count += 1
            else:
                ui.messageBox('Seznam, který jste poskytl, neodpovídá počtu vybraných operací! Skript bude nyní ukončen')
        if '~' in user_input[0]:
            # Rozdělení vstupu a převedení do seznamu
            input_list = re.search(r'~.*$', user_input[0])
            input_list = input_list[0]
            input_list = input_list.replace('~', '')
            input_list = input_list.split(',')
            
            # Odstranění doplňkových argumentů z uživatelského vstupu
            extract = re.search(f"(.*?){re.escape('~')}", user_input[0])
            user_input = extract[0]
            user_input = user_input.replace('~', '')
            
            count = 0
            new_number = float(input_list[0])
            add_number = float(input_list[1])
            for sel_op in a_selections:
                if count == 0:
                    sel_op.entity.name = f'{user_input}_{new_number}'
                if count &amp;gt; 0:
                    new_number += add_number
                    sel_op.entity.name = f'{user_input}_{new_number}'
                
                count += 1
                
            
            
except Exception as err:
    if selections.count &amp;lt; 1:
        # error_message = f'Nebyl proveden žádný výběr!\nBylo vybráno {selections.count}
        ui.messageBox(err)
    if ui:
      ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 08:34:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12663164#M1781</guid>
      <dc:creator>Tomas_V_cz</dc:creator>
      <dc:date>2024-03-25T08:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12663770#M1782</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14969158"&gt;@Tomas_V_cz&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is what I tried.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import adsk.core, adsk.fusion, adsk.cam, traceback
import re
import sys

ui = None
def run(context):
    # Get the application and userInterface
    app = adsk.core.Application.get()
    ui = app.userInterface
    ui_var = app.userInterface

    # Get the value of the property.
    propertyValue = ui.commandDefinitions

    # Get the active product.
    cam = adsk.cam.CAM.cast(app.activeProduct)

    # Check if anything was returned.
    if (cam is None):
        ui.messageBox('Você deve estar na área de trabalho Concluído (CAM)!')
    
    # Get the Setups collection object from the CAM object.
    setups = cam.setups

    # Get the first Setup object in the CAM product.
    setup = setups.item(0)

    # Get the Operations collection object that contains all the operations in the setup.
    operations = setup.operations

    # Get the first operation in the collection.
    operation = operations.item(0)

    # Get selected Operations
    selections = ui.activeSelections
    try:
        # print(f'Es sind {selections.count} Operationen ausgewählt!')
        a_selections = selections.asArray()
        if selections.count == 0:
            ui.messageBox('Nenhuma seleção de operação foi feita')
            adsk.terminate()
        if selections.count &amp;gt;= 1:
            # Abfrage Operations Bezeichnungen
            vorgabe = a_selections[0].entity.name
            user_input = ui_var.inputBox("Nome básico da operação", "Qual deve ser o nome básico das operações?", vorgabe)
            if user_input[1]:
                ui.messageBox('Eingabe wurde abgebrochen')
                adsk.terminate()

            if '~' not in user_input[0]:
                number = 1
                # for sel_op in a_selections:
                #     sel_op.entity.name = f'{user_input[0]}_{number}'
                #     number += 1

                opeLst = [s.entity for s in a_selections]

                if isinstance(opeLst[0], adsk.cam.Operation):
                    setup = opeLst[0].parent

                    for ope in setup.operations:
                        if ope in opeLst:
                            ope.name = f'{user_input[0]}_{number}'
                            number += 1

                
            if '~(' in user_input[0]:
                # Input Auseinandernehmen und in Liste umformen
                input_list = re.search(r'~(.*)$', user_input[0])
                input_list = input_list[0]
                input_list = input_list.replace('~', '').replace('(', '').replace(')', '')
                input_list = input_list.split(',')
            
                # Zusatzargumente aus user_input entfernen
                extract = re.search(f"(.*?){re.escape('~')}", user_input[0])
                user_input = extract[0]
                user_input = user_input.replace('~', '')
            
                if len(a_selections) == len(input_list):
                    count = 0
                    for sel_op in a_selections:
                        sel_op.entity.name = f'{user_input}_{input_list[count]}'
                        count += 0
                else:
                    ui.messageBox('A lista que você forneceu não corresponde ao número de operações selecionadas! O script terminará agora')
            if '~' in user_input[0]:
                # Input Auseinandernehmen und in Liste umformen
                input_list = re.search(r'~.*$', user_input[0])
                input_list = input_list[0]
                input_list = input_list.replace('~', '')
                input_list = input_list.split(',')
            
                # Zusatzargumente aus user_input entfernen
                extract = re.search(f"(.*?){re.escape('~')}", user_input[0])
                user_input = extract[0]
                user_input = user_input.replace('~', '')
            
                count = 0
                new_number = float(input_list[0])
                add_number = float(input_list[1])
                for sel_op in a_selections:
                    if count == 0:
                        sel_op.entity.name = f'{user_input}_{new_number}'
                    if count &amp;gt; 0:
                        new_number += add_number
                        sel_op.entity.name = f'{user_input}_{new_number}'
                
                    count += 1
                
    except Exception as err:
        if selections.count &amp;lt; 1:
            # error_message = f'Es wurde keine Auswahl getroffen!\nEs wurden {selections.count} operationen ausgewählt'
            ui.messageBox(err)
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;The data I used is also attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 13:33:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12663770#M1782</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-25T13:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12664214#M1783</link>
      <description>&lt;P&gt;&lt;SPAN&gt;thanks, now it works perfectly...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;would it be possible to capture for example the diameter of the tool in the operation comment?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;For example, I would select drilling operations and the script would complete the text-&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;drill hole - tool diameter&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 16:37:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12664214#M1783</guid>
      <dc:creator>Tomas_V_cz</dc:creator>
      <dc:date>2024-03-25T16:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12664405#M1784</link>
      <description>Awesome. Is perfect&lt;BR /&gt;&lt;BR /&gt;Based in this script, is hard to create a NC program for each toolpath&lt;BR /&gt;selected?&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Mar 2024 18:05:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12664405#M1784</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-03-25T18:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12664859#M1785</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3787950"&gt;@kandennti&lt;/a&gt;&amp;nbsp;hey mister&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help with One more thing? Its very important and useful in my company.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to select all toolpaths, and create a single NC program for each toolpath selected&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 21:37:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12664859#M1785</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-03-25T21:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666535#M1786</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14771110"&gt;@nubrandao&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't worked on the Fusion360 API for a while, so I need some time to research and try it out.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 14:00:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666535#M1786</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-26T14:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666643#M1787</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14969158"&gt;@Tomas_V_cz&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps I can do what you want, but I do not understand it in detail.&lt;/P&gt;
&lt;P&gt;Since my native language is not English, I often cannot understand the meaning of the text alone.&lt;BR /&gt;I think it would be easier to understand the meaning and arrive at the answer if you could present images or data.&lt;BR /&gt;(This is not only you, but many others as well.)&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 14:38:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666643#M1787</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-26T14:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666776#M1788</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Good day,&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;my language is also not English, but for demonstration we switched Fusion to English environment.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I would like to automate the output to the program as much as possible, and I think that using a macro would be possible - I think mainly for drilling operations.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Example:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Drill bit diameter 6 drills holes.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diameter.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1342040i6EB27AD6FF32C871/image-size/large?v=v2&amp;amp;px=999" role="button" title="diameter.png" alt="diameter.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Operation created:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drill.png" style="width: 451px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1342042i7400EE85175CAC38/image-size/large?v=v2&amp;amp;px=999" role="button" title="drill.png" alt="drill.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Then a script would be activated that would complete the text:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drill Now.png" style="width: 468px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1342044i04BA046AA97A7CB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="drill Now.png" alt="drill Now.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;script would create text, for example&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;drill a hole dia. 6&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;or&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;drill a hole 6&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;It would automatically for the text:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;"drill&amp;nbsp; a hole" + tool diameter&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 15:42:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666776#M1788</guid>
      <dc:creator>Tomas_V_cz</dc:creator>
      <dc:date>2024-03-26T15:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666907#M1789</link>
      <description>&lt;P&gt;Thanks you very much&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 16:27:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666907#M1789</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-03-26T16:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666909#M1790</link>
      <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 16:27:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12666909#M1790</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-03-26T16:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12669562#M1791</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14969158"&gt;@Tomas_V_cz&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the clarification.&lt;/P&gt;
&lt;P&gt;I have created a script to add the tool diameter for now.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk
import adsk.core as core
import adsk.cam as cam
import re

_app: core.Application = None
_ui: core.UserInterface = None
_handlers = []

_setupSelIpt: core.SelectionCommandInput = None

CMD_INFO = {
    "id": "kantoku_rename_operations_by_diameter",
    "name": "rename operations by diameter",
    "tooltip": "rename operations by diameter"
}


class MyCommandCreatedHandler(core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()

    def notify(self, args: core.CommandCreatedEventArgs):
        core.Application.get().log(args.firingEvent.name)
        try:
            global _handlers
            cmd: core.Command = core.Command.cast(args.command)

            onDestroy = MyCommandDestroyHandler()
            cmd.destroy.add(onDestroy)
            _handlers.append(onDestroy)

            onExecute = MyExecuteHandler()
            cmd.execute.add(onExecute)
            _handlers.append(onExecute)

            onPreSelect = MyPreSelectHandler()
            cmd.preSelect.add(onPreSelect)
            _handlers.append(onPreSelect)

            inputs: core.CommandInputs = cmd.commandInputs
            global _setupSelIpt
            _setupSelIpt = inputs.addSelectionInput(
                "_setupSelIptId",
                "Setup",
                "Please select Setup."
            )

        except:
            _ui.messageBox("Failed:\n{}".format(traceback.format_exc()))


class MyPreSelectHandler(core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: core.SelectionEventArgs):
        ent = args.selection.entity
        if not ent.classType() == cam.Setup.classType():
            args.isSelectable = False


class MyExecuteHandler(core.CommandEventHandler):
    def __init__(self):
        super().__init__()

    def notify(self, args: core.CommandEventArgs):
        global _setupSelIpt
        rename_operations_by_diameter(_setupSelIpt.selection(0).entity)


class MyCommandDestroyHandler(core.CommandEventHandler):
    def __init__(self):
        super().__init__()

    def notify(self, args: core.CommandEventArgs):
        adsk.terminate()


def rename_operations_by_diameter(setup: cam.Setup):
    global _app
    camObj: cam.CAM = _app.activeProduct
    unitsMgr: core.UnitsManager = camObj.unitsManager
    ratio = unitsMgr.convert(
        1,
        unitsMgr.internalUnits,
        unitsMgr.defaultLengthUnits,
    )

    key = " Dia "
    for ope in setup.operations:
        if not hasattr(ope, "tool"): continue

        tool: cam.Tool = ope.tool
        dia = tool.parameters.itemByName(
            "tool_diameter"
        ).value.value

        if key in ope.name:
            pattern = key + r".*"
            name = re.sub(pattern, "", ope.name)
        else:
            name = ope.name

        newName = f"{name}{key}{dia * ratio}"
        if not ope.name == newName:
            ope.name = newName


def run(context):
    try:
        global _app, _ui
        _app = core.Application.get()
        _ui = _app.userInterface

        cmdDef: core.CommandDefinition = _ui.commandDefinitions.itemById(
            CMD_INFO["id"]
        )

        if not cmdDef:
            cmdDef = _ui.commandDefinitions.addButtonDefinition(
                CMD_INFO["id"],
                CMD_INFO["name"],
                CMD_INFO["tooltip"]
            )

        global _handlers
        onCommandCreated = MyCommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        _handlers.append(onCommandCreated)

        cmdDef.execute()

        adsk.autoTerminate(False)

    except:
        if _ui:
            _ui.messageBox("Failed:\n{}".format(traceback.format_exc()))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After running the script, a dialog appears.&lt;BR /&gt;Select "Setup" and press OK button to append the diameter.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 711px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1342642i0F49BFC78C1AC3B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;BR /&gt;If you change the tool after running the script once and the diameter changes, just run the script again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I figured out to change "drill" -&amp;gt; "drill a hole", but I didn't know what to change it to for the other types of operations.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 15:11:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12669562#M1791</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-27T15:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12669741#M1792</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;thank you for your script.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;It would be possible to add an option:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;include only for drilling operations (I think it's unnecessary for other operations)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;or:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;include only for selected operations (the operations on which the script would be activated would have to be selected with the mouse)?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Alternatively, both options for faster selection (only those operations for which the script would be activated would be selected from the drilling operations).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;and it would also be good if the text would be added after the existing one, or would replace it completely (the original text would be deleted)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thank you very much&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 16:08:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12669741#M1792</guid>
      <dc:creator>Tomas_V_cz</dc:creator>
      <dc:date>2024-03-27T16:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12671260#M1793</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14969158"&gt;@Tomas_V_cz&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry, but I didn't understand what you meant.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 06:05:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12671260#M1793</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-28T06:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12671487#M1794</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14969158"&gt;@Tomas_V_cz&lt;/a&gt;&amp;nbsp;Have you tried without a script, just select all operations slowly click the top one, rename to "mould" and it will number all below?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 08:09:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12671487#M1794</guid>
      <dc:creator>ArjanDijk</dc:creator>
      <dc:date>2024-03-28T08:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12671834#M1795</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Good day.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;In this latest version, the script is applied to all operations - but I think that, for example, I want the diameter of the tool (drill) only for drilling operations (and only for some, where the diameter of the tool = the diameter of the hole).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;SPAN class=""&gt;In the previous version, the operations were marked and the script was applied to them.&lt;/SPAN&gt; &lt;SPAN class=""&gt;This is not possible in this version.&lt;/SPAN&gt; &lt;SPAN class=""&gt;In this new version, the script is applied to all operations (which I think is not desirable).&lt;/SPAN&gt; &lt;SPAN class=""&gt;For example, I do not want the tool diameter to be displayed for milling operations, and this is not possible in this new version.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Furthermore, in this new version the original text remains and a new text is added after the old test (example Dia 50), in the old version the old (original) text was completely replaced by the new text, which I think is desirable.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 11:40:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12671834#M1795</guid>
      <dc:creator>Tomas_V_cz</dc:creator>
      <dc:date>2024-03-28T11:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12672944#M1796</link>
      <description>&lt;P&gt;Hi, did you tried to create NC program for each toolpath selected? Thanks on advance&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 19:17:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12672944#M1796</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-03-28T19:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12673553#M1797</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14969158"&gt;@Tomas_V_cz&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand what you mean.&lt;BR /&gt;I am attaching the file as it is long.&lt;/P&gt;
&lt;P&gt;・I have stopped selecting "Setup" and only "Drill" operations can be selected.&lt;BR /&gt;・I can now select the option to add/remove the tool diameter to/from the name.&lt;BR /&gt;・The name of the tool can be checked after the change, though it is simple.&lt;/P&gt;
&lt;P&gt;This is a script, so please be careful when registering it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 946px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1343432i993B23F6C3A5DD06/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 02:05:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12673553#M1797</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-29T02:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: fast rename dont work properly</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12673563#M1798</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14771110"&gt;@nubrandao&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have worked on this a bit, but feel it is not easy.&lt;BR /&gt;At first I was going to manipulate this check button on the NCProgram to perform the process, but I could not find a function in the API to manipulate this check.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1343433i1366575ABED1B0FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I think I will have to create a new NCProgram and either transcribe all the settings or duplicate them and do something with them, but I haven't fully researched it yet.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 02:20:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/fast-rename-dont-work-properly/m-p/12673563#M1798</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-29T02:20:33Z</dc:date>
    </item>
  </channel>
</rss>

