<?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 to change selected tool path model location in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335532#M3095</link>
    <description>&lt;P&gt;it actually should work with multi selection since the line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;EDIT PAR SELECTED 'ModelLocation'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;should change the parameter Modelllocation for every selected entity&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also to show the popup message you should turn em on not off&lt;/P&gt;&lt;LI-CODE lang="general"&gt;DIALOGS MESSAGE ON&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not&lt;/P&gt;&lt;LI-CODE lang="general"&gt;DIALOGS MESSAGE OFF&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 27 Oct 2023 13:13:20 GMT</pubDate>
    <dc:creator>icse</dc:creator>
    <dc:date>2023-10-27T13:13:20Z</dc:date>
    <item>
      <title>Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12330152#M3089</link>
      <description>&lt;P&gt;Good Day,&lt;/P&gt;&lt;P&gt;I'm working on this macro to change the model location of selected toolpaths, but I'm sort of stumped.&lt;/P&gt;&lt;P&gt;Any help would save the remaining hair on top of my head.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF $powermill.Status.MultipleSelection.First OR $powermill.Status.MultipleSelection.Total == 0 {&lt;/P&gt;&lt;P&gt;STRING $Message = "Choose New Machine Tool Model Location"&lt;BR /&gt;STRING LIST Selected_WORKPLANES = INPUT ENTITY MULTIPLE WORKPLANE $Message&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DIALOGS MESSAGE OFF&lt;BR /&gt;DIALOGS ERROR OFF&lt;BR /&gt;GRAPHICS LOCK&lt;/P&gt;&lt;P&gt;FOREACH $tp IN explorer_selected_entities() {&lt;BR /&gt;ACTIVATE TOOLPATH $tp.name&lt;BR /&gt;FOREACH $ref IN folder ('WORKPLANE') {&lt;BR /&gt;EDIT PAR 'ModelLocation' $ref&lt;BR /&gt;}&lt;BR /&gt;EDIT TOOLPATH $tp REAPPLYFROMGUI&lt;BR /&gt;YES&lt;BR /&gt;}&lt;BR /&gt;MESSAGE INFO "All Selected Toolpath Machine Tool Model Locations Have Been Updated "&lt;BR /&gt;TEXTINFO ACCEPT&lt;/P&gt;&lt;P&gt;DIALOGS MESSAGE ON&lt;BR /&gt;DIALOGS ERROR ON&lt;BR /&gt;GRAPHICS UNLOCK&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 14:09:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12330152#M3089</guid>
      <dc:creator>evo80</dc:creator>
      <dc:date>2023-10-25T14:09:08Z</dc:date>
    </item>
    <item>
      <title>Betreff: Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12330267#M3090</link>
      <description>&lt;P&gt;maby this can help you:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;if size(explorer_selected_entities()) &amp;lt;= 0 or explorer_selected_entities()[0].RootType != 'toolpath' {
	return
}

entity $newWorkplane = INPUT ENTITY WORKPLANE "Choose New Machine Tool Model Location"

DEACTIVATE Toolpath
EDIT PAR 'ModelLocation' ${newWorkplane.Name}
EDIT PAR SELECTED ModelLocation&lt;/LI-CODE&gt;&lt;P&gt;but it will invalidate the toolpaths&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you also could change the last line tho this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;EDIT PAR SELECTED ModelLocation accept&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;so no querry apears.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 14:46:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12330267#M3090</guid>
      <dc:creator>icse</dc:creator>
      <dc:date>2023-10-25T14:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12330378#M3091</link>
      <description>&lt;P&gt;Thanks for the help,&lt;/P&gt;&lt;P&gt;I didn't have any luck with the code,&lt;/P&gt;&lt;P&gt;Here are the command window results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Process Command : [entity $newWorkplane = INPUT ENTITY WORKPLANE "Choose New Machine Tool Model Location"\n]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Process Command : [\n]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Process Command : [DEACTIVATE Toolpath\n]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Process Command : [EDIT PAR 'ModelLocation' ${newWorkplane.Name}\n]&lt;/P&gt;&lt;P&gt;Error: Cannot evaluate expression:&lt;BR /&gt;newWorkplane.Name&lt;BR /&gt;Error: DMG_Attach_Op3&lt;/P&gt;&lt;P&gt;Process Command : [EDIT PAR SELECTED ModelLocation\n]&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 15:25:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12330378#M3091</guid>
      <dc:creator>evo80</dc:creator>
      <dc:date>2023-10-25T15:25:40Z</dc:date>
    </item>
    <item>
      <title>Betreff: Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12334897#M3092</link>
      <description>&lt;P&gt;Thats odd... yesterday i wasnt able to reproduce the error today i got same error&lt;/P&gt;&lt;P&gt;this should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;if size(explorer_selected_entities()) &amp;lt;= 0 or explorer_selected_entities()[0].RootType != 'toolpath' {
	return
}

entity $newWorkplane = INPUT ENTITY WORKPLANE "Choose New Machine Tool Model Location"
deactivate toolpath
string $cmd = 'EDIT PAR "ModelLocation" "' + $newWorkplane.Name + '"'
docommand $cmd
EDIT PAR SELECTED 'ModelLocation'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 13:10:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12334897#M3092</guid>
      <dc:creator>icse</dc:creator>
      <dc:date>2023-10-27T13:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335473#M3093</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14304290"&gt;@icse&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou very much that works famously for a single selected tool path!&lt;/P&gt;&lt;P&gt;So I edited the code to allow multiple tool path selection, which works fine, the only thing this code doesn't do is have the invalidation message pop up, don't suppose you know how I can include this message?&lt;/P&gt;&lt;P&gt;Not a big deal really, I can live without it, just a fail safe would be nice.&lt;/P&gt;&lt;P&gt;Regards Jon Keeler&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 12:46:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335473#M3093</guid>
      <dc:creator>evo80</dc:creator>
      <dc:date>2023-10-27T12:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335486#M3094</link>
      <description>&lt;LI-CODE lang="general"&gt;IF $powermill.Status.MultipleSelection.First OR $powermill.Status.MultipleSelection.Total == 0 {

DIALOGS MESSAGE OFF
DIALOGS ERROR OFF
GRAPHICS LOCK

if size(explorer_selected_entities()) &amp;lt;= 0 or explorer_selected_entities()[0].RootType != 'toolpath' {
	return
}

entity $newWorkplane = INPUT ENTITY WORKPLANE "Choose New Machine Tool Model Location"
string $cmd = 'EDIT PAR "ModelLocation" "' + $newWorkplane.Name + '"'

FOREACH $tp IN explorer_selected_entities() {
docommand $cmd
EDIT PAR SELECTED 'ModelLocation'
}

DIALOGS MESSAGE ON
DIALOGS ERROR ON
GRAPHICS UNLOCK&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 27 Oct 2023 12:51:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335486#M3094</guid>
      <dc:creator>evo80</dc:creator>
      <dc:date>2023-10-27T12:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335532#M3095</link>
      <description>&lt;P&gt;it actually should work with multi selection since the line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;EDIT PAR SELECTED 'ModelLocation'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;should change the parameter Modelllocation for every selected entity&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also to show the popup message you should turn em on not off&lt;/P&gt;&lt;LI-CODE lang="general"&gt;DIALOGS MESSAGE ON&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not&lt;/P&gt;&lt;LI-CODE lang="general"&gt;DIALOGS MESSAGE OFF&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 27 Oct 2023 13:13:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335532#M3095</guid>
      <dc:creator>icse</dc:creator>
      <dc:date>2023-10-27T13:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to change selected tool path model location</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335583#M3096</link>
      <description>&lt;P&gt;Sorry, Your code does indeed change selected tool paths, my mistake.&lt;/P&gt;&lt;P&gt;Thanks for your help, this was something that was taking up a lot of my time, so now being able to select all toolpaths&lt;/P&gt;&lt;P&gt;and changing the model location for different ops has helped tremendously!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 13:31:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-change-selected-tool-path-model-location/m-p/12335583#M3096</guid>
      <dc:creator>evo80</dc:creator>
      <dc:date>2023-10-27T13:31:28Z</dc:date>
    </item>
  </channel>
</rss>

