<?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 Betreff: rename Ncprograms macro in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12939073#M1463</link>
    <description>&lt;P&gt;Ok. This machine has no tool change, so each nc prog even if has multiple toolpaths, use only one unique tool.&lt;/P&gt;&lt;P&gt;assume toolpaths:&lt;/P&gt;&lt;P&gt;1_EM8&lt;/P&gt;&lt;P&gt;4_EM10&lt;/P&gt;&lt;P&gt;5_EM10&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;one Nc has both&amp;nbsp;4_EM10 and&amp;nbsp;5_EM10, So renaming Ncs should be something like:&lt;/P&gt;&lt;P&gt;1_EM8&lt;/P&gt;&lt;P&gt;4_And_5_EM10&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 04:50:23 GMT</pubDate>
    <dc:creator>hrh46</dc:creator>
    <dc:date>2024-08-05T04:50:23Z</dc:date>
    <item>
      <title>rename Ncprograms macro</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12938263#M1461</link>
      <description>&lt;P&gt;I have a macro renaming all toolpaths by an index number and tool name.is it possible to rename ncprograms based on&lt;/P&gt;&lt;P&gt;new toolpaths name?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2024 13:09:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12938263#M1461</guid>
      <dc:creator>hrh46</dc:creator>
      <dc:date>2024-08-04T13:09:55Z</dc:date>
    </item>
    <item>
      <title>Betreff: rename Ncprograms macro</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12938702#M1462</link>
      <description>&lt;P&gt;I think so...&lt;/P&gt;&lt;P&gt;But i need more information about how you whant to rename the nc program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give me an example?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2024 21:37:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12938702#M1462</guid>
      <dc:creator>icse</dc:creator>
      <dc:date>2024-08-04T21:37:29Z</dc:date>
    </item>
    <item>
      <title>Betreff: rename Ncprograms macro</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12939073#M1463</link>
      <description>&lt;P&gt;Ok. This machine has no tool change, so each nc prog even if has multiple toolpaths, use only one unique tool.&lt;/P&gt;&lt;P&gt;assume toolpaths:&lt;/P&gt;&lt;P&gt;1_EM8&lt;/P&gt;&lt;P&gt;4_EM10&lt;/P&gt;&lt;P&gt;5_EM10&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;one Nc has both&amp;nbsp;4_EM10 and&amp;nbsp;5_EM10, So renaming Ncs should be something like:&lt;/P&gt;&lt;P&gt;1_EM8&lt;/P&gt;&lt;P&gt;4_And_5_EM10&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 04:50:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12939073#M1463</guid>
      <dc:creator>hrh46</dc:creator>
      <dc:date>2024-08-05T04:50:23Z</dc:date>
    </item>
    <item>
      <title>Betreff: rename Ncprograms macro</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12939368#M1464</link>
      <description>&lt;P&gt;can you try this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;entity list $ncs = input entity multiple ncprogram 'select nc programs wich should be renamed:'

if size($ncs) &amp;lt; 1 {
	return
}


foreach $nc in $ncs {

	if size(components($nc)) &amp;lt; 1 {
		continue
	}
	
	string list $tpsuffixes = {}
	
	foreach $tp in components($nc) {
		int $i = add_last($tpsuffixes, tokens($tp.Name,'_')[0])
	}
	string $newNcName = join($tpsuffixes,'_And_') + '_' + components($nc)[0].Tool.Name
	
	if $nc.Name == $newNcName {
		continue
	}
	
	if entity_exists('ncprogram',$newNcName) {
		$newNcName = new_entity_name('ncprogram',$newNcName)
	}
	
	rename ncprogram ${nc.Name} ${newNcName}
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Aug 2024 07:52:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12939368#M1464</guid>
      <dc:creator>icse</dc:creator>
      <dc:date>2024-08-05T07:52:53Z</dc:date>
    </item>
    <item>
      <title>Betreff: rename Ncprograms macro</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12939474#M1465</link>
      <description>&lt;P&gt;Many Thanks. that was what I need.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 09:01:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/rename-ncprograms-macro/m-p/12939474#M1465</guid>
      <dc:creator>hrh46</dc:creator>
      <dc:date>2024-08-05T09:01:38Z</dc:date>
    </item>
  </channel>
</rss>

