<?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 help Powermill in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13783841#M32813</link>
    <description>&lt;P&gt;Are you trying to do this for each toolpath in an NC program, a toolpath folder, Setup, all toolpaths, or only selected toolpaths? I can help you get this to loop over the toolpaths you want, but depending on which toolpaths you want to loop over the code will look differently.&lt;BR /&gt;&lt;BR /&gt;for example if you want only selected toolpaths you could do something like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// loop through selected toolpaths in the explorer
foreach tp in explorer_selected_entities() {

    // Skip toolpaths that don't have the clockwise parameter
    if NOT active($tp.drill.clockwise) {
        continue
    }

    // Skip toolpaths that are already set to clockwise
    if $tp.drill.clockwise == 1 {
        continue
    }

    // Change the parameter and calculate the toolpath
    activate Toolpath $tp.name
    EDIT DRILL CLOCKWISE ON
    EDIT TOOLPATH $tp.name REAPPLYFROMGUI
    EDIT TOOLPATH $tp.name CALCULATE
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Aug 2025 17:41:55 GMT</pubDate>
    <dc:creator>Sean571</dc:creator>
    <dc:date>2025-08-26T17:41:55Z</dc:date>
    <item>
      <title>Macro help Powermill</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13783728#M32811</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope this is in the correct place.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a small problem, new here so don’t judge .&lt;/P&gt;&lt;P&gt;I want to create a macro that edits the selected program, activates ‘clockwise’ and then calculates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using the record macro feature but this only works on one toolpath because of its name example;&lt;/P&gt;&lt;P&gt;EDIT TOOLPATH “001” RECYCLE&lt;/P&gt;&lt;P&gt;EDIT DRILL CLOCKWISE ON&lt;/P&gt;&lt;P&gt;EDIT TOOLPATH “001” CALCULATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then when I try to do this for 002 programs and so on it goes back to 001 obviously.&lt;/P&gt;&lt;P&gt;Ive tried replacing “001” with $selected_toolpath and $tp.name but get error message these toolpaths don’t exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Aug 2025 16:41:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13783728#M32811</guid>
      <dc:creator>kingrazz</dc:creator>
      <dc:date>2025-08-26T16:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro help Powermill</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13783841#M32813</link>
      <description>&lt;P&gt;Are you trying to do this for each toolpath in an NC program, a toolpath folder, Setup, all toolpaths, or only selected toolpaths? I can help you get this to loop over the toolpaths you want, but depending on which toolpaths you want to loop over the code will look differently.&lt;BR /&gt;&lt;BR /&gt;for example if you want only selected toolpaths you could do something like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// loop through selected toolpaths in the explorer
foreach tp in explorer_selected_entities() {

    // Skip toolpaths that don't have the clockwise parameter
    if NOT active($tp.drill.clockwise) {
        continue
    }

    // Skip toolpaths that are already set to clockwise
    if $tp.drill.clockwise == 1 {
        continue
    }

    // Change the parameter and calculate the toolpath
    activate Toolpath $tp.name
    EDIT DRILL CLOCKWISE ON
    EDIT TOOLPATH $tp.name REAPPLYFROMGUI
    EDIT TOOLPATH $tp.name CALCULATE
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Aug 2025 17:41:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13783841#M32813</guid>
      <dc:creator>Sean571</dc:creator>
      <dc:date>2025-08-26T17:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro help Powermill</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13788708#M32824</link>
      <description>&lt;P&gt;&lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/17829865"&gt;@kingrazz&lt;/a&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did the information provided answer your question? If so, please use Accept Solution so that others may find this in the future. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 13:40:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13788708#M32824</guid>
      <dc:creator>CGBenner</dc:creator>
      <dc:date>2025-08-29T13:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro help Powermill</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13788755#M32825</link>
      <description>&lt;P&gt;Unfortunately I didn’t get round to using/trying it.&amp;nbsp;&lt;BR /&gt;I will try and test it out Monday and report back, thanks for everyone’s time.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 14:12:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-help-powermill/m-p/13788755#M32825</guid>
      <dc:creator>kingrazz</dc:creator>
      <dc:date>2025-08-29T14:12:24Z</dc:date>
    </item>
  </channel>
</rss>

