<?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 Macro Gurus Help Please in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072410#M9294</link>
    <description>&lt;P&gt;So I know there is a lot of information about toolpath renaming, but I require a specific naming scheme for my company's internal needs. I would like to pull the toolpath folder name and change the order of the characters, add "OP" and an A,B,C and so on if the toolpath has the same name. Here's a screenshot of what I'm looking for:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Toolpath Name.PNG" style="width: 200px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/879321i7B71C47CF83F5C2D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Toolpath Name.PNG" alt="Toolpath Name.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any help is appreciated!&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 12:44:09 GMT</pubDate>
    <dc:creator>markdiGXTYE</dc:creator>
    <dc:date>2021-02-10T12:44:09Z</dc:date>
    <item>
      <title>Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072410#M9294</link>
      <description>&lt;P&gt;So I know there is a lot of information about toolpath renaming, but I require a specific naming scheme for my company's internal needs. I would like to pull the toolpath folder name and change the order of the characters, add "OP" and an A,B,C and so on if the toolpath has the same name. Here's a screenshot of what I'm looking for:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Toolpath Name.PNG" style="width: 200px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/879321i7B71C47CF83F5C2D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Toolpath Name.PNG" alt="Toolpath Name.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 12:44:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072410#M9294</guid>
      <dc:creator>markdiGXTYE</dc:creator>
      <dc:date>2021-02-10T12:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072418#M9295</link>
      <description>&lt;P&gt;Could you upload a picture of what the toolpath names look like before and how you would like them to look after the macro is ran?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 12:47:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072418#M9295</guid>
      <dc:creator>cfastNJWK6</dc:creator>
      <dc:date>2021-02-10T12:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072511#M9296</link>
      <description>&lt;P&gt;I would like it to replace the toolpaths with what I have named to the way it looks on the screen snip. Plus I would like to run the macro off an active folder containing the toolpath folders. That's why I thought pulling the toolpath folder name might work out better, the toolpath folders will be named already.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 13:15:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072511#M9296</guid>
      <dc:creator>markdiGXTYE</dc:creator>
      <dc:date>2021-02-10T13:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072668#M9297</link>
      <description>&lt;P&gt;You will have to be very consistent with how you name your folders for this type of macro to work.&amp;nbsp; Right now it looks like you want to take the third character of the folder name and make that the first character of the toolpath name.&amp;nbsp; Then add "OP".&amp;nbsp; Then add the first character of the folder name.&amp;nbsp; Then add the last 2 characters of the folder name.&amp;nbsp; If that name already exists in the folder, add the next letter of the alphabet to the end of the toolpath name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that logic seem correct?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 14:18:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072668#M9297</guid>
      <dc:creator>cfastNJWK6</dc:creator>
      <dc:date>2021-02-10T14:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072686#M9298</link>
      <description>&lt;P&gt;Yes, exactly. Unless there is an easier solution then pulling the folder name&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 14:25:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072686#M9298</guid>
      <dc:creator>markdiGXTYE</dc:creator>
      <dc:date>2021-02-10T14:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072906#M9299</link>
      <description>&lt;P&gt;Something like this should be close to what you are looking for:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;STRING LIST $Alphabet = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}
STRING LIST $TpFolders = get_folders('toolpath')

INT $TpFolder = INPUT CHOICE $TpFolders "Select Folder"
STRING $FolderPath = $TpFolders[0]
STRING $FolderName = $TpFolders[0]
$FolderName = replace($FolderName, "Toolpath\", "")

STRING $TpBaseName = ""
$TpBaseName = substring($FolderName, 2, 1) + "OP" + substring($FolderName, 0, 1) + substring($FolderName, 3, 2)

INT $counter = 0
FOREACH $tp IN folder($FolderPath) {
	
	STRING $NewName = $TpBaseName
	IF entity_exists(entity('Toolpath', $NewName)) {
		$NewName = $NewName + $Alphabet[$counter]
		$Counter = $Counter + 1
		}
	RENAME TOOLPATH $tp $NewName
	
	}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 15:20:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10072906#M9299</guid>
      <dc:creator>cfastNJWK6</dc:creator>
      <dc:date>2021-02-10T15:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10073325#M9300</link>
      <description>&lt;P&gt;Thanks for taking the time to write this out. It doesn't work exactly as expected, it seems to just read the top folder in the toolpath tree. Any way to use the name from the active folder?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 17:29:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10073325#M9300</guid>
      <dc:creator>markdiGXTYE</dc:creator>
      <dc:date>2021-02-10T17:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10073430#M9301</link>
      <description>&lt;P&gt;The previous macro will use whatever folder you select in the drop-down menu.&amp;nbsp; This one will use the active folder:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;STRING LIST $Alphabet = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}
STRING LIST $TpFolders = get_folders('toolpath')

//INT $TpFolder = INPUT CHOICE $TpFolders "Select Folder"
INT $TpFolder = ACTIVE_FOLDER()
STRING $FolderPath = $TpFolders[0]
STRING $FolderName = $TpFolders[0]
$FolderName = replace($FolderName, "Toolpath\", "")

STRING $TpBaseName = ""
$TpBaseName = substring($FolderName, 2, 1) + "OP" + substring($FolderName, 0, 1) + substring($FolderName, 3, 2)

INT $counter = 0
FOREACH $tp IN folder($FolderPath) {
	
	STRING $NewName = $TpBaseName
	IF entity_exists(entity('Toolpath', $NewName)) {
		$NewName = $NewName + $Alphabet[$counter]
		$Counter = $Counter + 1
		}
	RENAME TOOLPATH $tp $NewName
	
	}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 18:05:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10073430#M9301</guid>
      <dc:creator>cfastNJWK6</dc:creator>
      <dc:date>2021-02-10T18:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Gurus Help Please</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10073715#M9302</link>
      <description>&lt;P&gt;Cool, I have something that works. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 19:41:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-gurus-help-please/m-p/10073715#M9302</guid>
      <dc:creator>markdiGXTYE</dc:creator>
      <dc:date>2021-02-10T19:41:49Z</dc:date>
    </item>
  </channel>
</rss>

