<?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: Macro error help in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13657644#M32595</link>
    <description>&lt;P&gt;Hi I still get the Copy folder error&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="anto_joseph4HH2K_1-1748602986820.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1538817i04C5C89AAF127D77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anto_joseph4HH2K_1-1748602986820.png" alt="anto_joseph4HH2K_1-1748602986820.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 May 2025 11:03:11 GMT</pubDate>
    <dc:creator>anto_joseph4HH2K</dc:creator>
    <dc:date>2025-05-30T11:03:11Z</dc:date>
    <item>
      <title>Macro error help</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13655863#M32591</link>
      <description>&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;This PowerMill macro duplicates the active toolpath folder into several new folders, each with a specific name and thickness. It then updates the toolpath thickness in each new folder, adding 0.04 mm extra if the strategy is "Corner Finishing." But I get an error at the line that makes copy of the folder.Can any one help please&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 10:14:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13655863#M32591</guid>
      <dc:creator>anto_joseph4HH2K</dc:creator>
      <dc:date>2025-05-29T10:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error help</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13657174#M32592</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15835080"&gt;@anto_joseph4HH2K&lt;/a&gt;:&lt;BR /&gt;The root of the problem is using $variable inside double quotes. I suggest that you create a new string for the path instead.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="csharp"&gt;STRING temp = ACTIVE_FOLDER()
STRING sourceFolder = replace(temp, 'Toolpath\', '')
STRING LIST targetFolders = { "OP1-CMS-FINISH-0-40", "OP1-CMS-FINISH-0-30", "OP1-CMS-FINISH-0-20", "OP1-CMS-FINISH-0-15", "OP1-CMS-FINISH-0-10","OP1-CMS-FINISH-0-05", "OP1-CMS-FINISH-0-00","OP1-CMS-FINISH-M0-05", "OP1-CMS-FINISH-M0-10", "OP1-CMS-FINISH-M0-15","OP1-CMS-FINISH-M0–20"}

REAL LIST baseThicknesses = { 0.4,0.3, 0.2,0.15, 0.10,0.05, 0.0,-0.05, -0.1,-0.15, -0.2}

INT count = size(targetFolders)
INT i = 0

WHILE $i &amp;lt; $count {
STRING target = targetFolders[$i]
REAL thickness = baseThicknesses[$i]


string full_sourceFolder = "Toolpath\" +  $sourceFolder
string full_target = "Toolpath\" + $target


// COPY FOLDER "Toolpath\$sourceFolder" "Toolpath\$target"
COPY FOLDER $full_sourceFolder $full_target



FOREACH tp IN folder("Toolpath\$target") {
ACTIVATE TOOLPATH $tp.Name
REAL finalThickness = thickness
IF lcase($toolpath.Strategy.Name) == "corner finishing" {
$finalThickness = $finalThickness + 0.04
}
EDIT TOOLPATH THICKNESS $finalThickness
}

$i = $i + 1
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 03:44:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13657174#M32592</guid>
      <dc:creator>nguyenthinhvt95</dc:creator>
      <dc:date>2025-05-30T03:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error help</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13657644#M32595</link>
      <description>&lt;P&gt;Hi I still get the Copy folder error&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="anto_joseph4HH2K_1-1748602986820.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1538817i04C5C89AAF127D77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anto_joseph4HH2K_1-1748602986820.png" alt="anto_joseph4HH2K_1-1748602986820.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 11:03:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13657644#M32595</guid>
      <dc:creator>anto_joseph4HH2K</dc:creator>
      <dc:date>2025-05-30T11:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error help</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13680502#M32608</link>
      <description>&lt;P&gt;I hope this is working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STRING temp = active_folder()&lt;BR /&gt;IF $temp EQ "" {&lt;BR /&gt;RETURN&lt;BR /&gt;}&lt;BR /&gt;STRING sourceFolder = replace(temp, 'Toolpath\', '')&lt;BR /&gt;STRING LIST targetFolders = { "OP1-CMS-FINISH-0-40", "OP1-CMS-FINISH-0-30", "OP1-CMS-FINISH-0-20", "OP1-CMS-FINISH-0-15", "OP1-CMS-FINISH-0-10","OP1-CMS-FINISH-0-05", "OP1-CMS-FINISH-0-00","OP1-CMS-FINISH-M0-05", "OP1-CMS-FINISH-M0-10", "OP1-CMS-FINISH-M0-15","OP1-CMS-FINISH-M0–20"}&lt;BR /&gt;REAL LIST baseThicknesses = { 0.4 , 0.3 , 0.2 , 0.15 , 0.10 , 0.05 , 0.0 , -0.05 , -0.1 , -0.15 , -0.2}&lt;/P&gt;&lt;P&gt;INT count = size(targetFolders)&lt;BR /&gt;INT i = 0&lt;/P&gt;&lt;P&gt;WHILE $i &amp;lt; $count {&lt;BR /&gt;STRING target = $targetFolders[$i]&lt;BR /&gt;REAL thick = $baseThicknesses[$i]&lt;/P&gt;&lt;P&gt;STRING cmd = "RENAME FOLDER "+'"'+$temp+'" "Temp___Temp"'&lt;BR /&gt;DOCOMMAND $cmd&lt;BR /&gt;&lt;BR /&gt;COPY TOOLPATH FOLDER "Toolpath\Temp___Temp"&lt;/P&gt;&lt;P&gt;$cmd = "RENAME FOLDER "+'"Toolpath\Temp___Temp" "'+$sourcefolder+'"'&lt;BR /&gt;DOCOMMAND $cmd&lt;/P&gt;&lt;P&gt;$cmd = "RENAME FOLDER "+'"Toolpath\Temp___Temp_1" "'+$target+'"'&lt;BR /&gt;DOCOMMAND $cmd&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FOREACH tp IN reverse(folder("Toolpath\" + $target)) {&lt;BR /&gt;ACTIVATE TOOLPATH $tp&lt;BR /&gt;INVALIDATE TOOLPATH $tp&lt;BR /&gt;EDIT PAR 'UseAxialThickness' '0'&lt;BR /&gt;IF position($tp.Strategy, "_corner") NE -1 {&lt;BR /&gt;EDIT PAR 'Thickness' ${$Thick + 0.04}&lt;BR /&gt;} ELSE {&lt;BR /&gt;EDIT PAR 'Thickness' $Thick&lt;BR /&gt;}&lt;BR /&gt;EDIT TOOLPATH $tp REAPPLYFROMGUI&lt;BR /&gt;}&lt;BR /&gt;$i = $i + 1&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 12:43:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13680502#M32608</guid>
      <dc:creator>a_bako</dc:creator>
      <dc:date>2025-06-13T12:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error help</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13722084#M32701</link>
      <description>&lt;P&gt;Hi,it works great except for the last folder is renamed as "OP1-CMS-FINISH-M0â€“20"&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 06:57:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13722084#M32701</guid>
      <dc:creator>anto_joseph4HH2K</dc:creator>
      <dc:date>2025-07-12T06:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error help</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13735723#M32725</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My colleague (a_bako) is on holiday. He'll come back to you when he returned next week.&lt;/P&gt;&lt;P&gt;Thank you for your patience.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 19:02:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13735723#M32725</guid>
      <dc:creator>iroda</dc:creator>
      <dc:date>2025-07-22T19:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error help</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13745998#M32734</link>
      <description>&lt;P&gt;It seems there&amp;nbsp; is an issue in&amp;nbsp;"targetFolders"&amp;nbsp; list.&lt;/P&gt;&lt;P&gt;Please check the last item of "targetFolders" list. It must be "OP1-CMS-FINISH-M0–20" .&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 08:37:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-error-help/m-p/13745998#M32734</guid>
      <dc:creator>a_bako</dc:creator>
      <dc:date>2025-07-30T08:37:45Z</dc:date>
    </item>
  </channel>
</rss>

