<?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: associate a variable with the selection type in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/associate-a-variable-with-the-selection-type/m-p/10228020#M8928</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FOREACH item IN explorer_selected_entities() {
   STRING NomeDef=$item.Name+$agg
   IF NOT entity_exists($item.RootType,$NomeDef) {
      STRING cmd='RENAME ' +$item.RootType +' "' + $item.Name +'" "' + $NomeDef + '"'
      DoCommand $cmd
   } ELSE {
      STRING msg='Errore rinomina '+CRLF+$item.Name+' -&amp;gt; '+$NomeDef
      MESSAGE ERROR $msg
      RETURN
   }
}&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 10 Apr 2021 21:01:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-04-10T21:01:16Z</dc:date>
    <item>
      <title>associate a variable with the selection type</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/associate-a-variable-with-the-selection-type/m-p/10226910#M8927</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;how can I write the macro below to use it with all entities selected in the explorer?&lt;/P&gt;&lt;P&gt;I know I can copy this macro for the pattern, boundary etc, but probably some of you can be smarter!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FOREACH toolpath IN explorer_selected_entities() {&lt;BR /&gt;int s = add_last(EntitiesSelected, $toolpath.Name)&lt;/P&gt;&lt;P&gt;STRING nome = $toolpath.Name&lt;/P&gt;&lt;P&gt;STRING Nomedef = ($nome + $agg)&lt;BR /&gt;IF NOT entity_exists('toolpath',$Nomedef) {&lt;BR /&gt;RENAME TOOLPATH $nome $Nomedef&lt;BR /&gt;} ELSE {&lt;BR /&gt;STRING Errore ='Errore rinomina' + crlf + $nome + ' -&amp;gt; ' + $Nomedef&lt;BR /&gt;MESSAGE INFO $Errore&lt;BR /&gt;RETURN&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 07:22:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/associate-a-variable-with-the-selection-type/m-p/10226910#M8927</guid>
      <dc:creator>graziano.fontolan</dc:creator>
      <dc:date>2021-04-10T07:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: associate a variable with the selection type</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/associate-a-variable-with-the-selection-type/m-p/10228020#M8928</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FOREACH item IN explorer_selected_entities() {
   STRING NomeDef=$item.Name+$agg
   IF NOT entity_exists($item.RootType,$NomeDef) {
      STRING cmd='RENAME ' +$item.RootType +' "' + $item.Name +'" "' + $NomeDef + '"'
      DoCommand $cmd
   } ELSE {
      STRING msg='Errore rinomina '+CRLF+$item.Name+' -&amp;gt; '+$NomeDef
      MESSAGE ERROR $msg
      RETURN
   }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 10 Apr 2021 21:01:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/associate-a-variable-with-the-selection-type/m-p/10228020#M8928</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-10T21:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: associate a variable with the selection type</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/associate-a-variable-with-the-selection-type/m-p/10230690#M8929</link>
      <description>Thank you!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Apr 2021 09:08:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/associate-a-variable-with-the-selection-type/m-p/10230690#M8929</guid>
      <dc:creator>graziano.fontolan</dc:creator>
      <dc:date>2021-04-12T09:08:46Z</dc:date>
    </item>
  </channel>
</rss>

