<?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: Run the macro only if the selected item is correct in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/run-the-macro-only-if-the-selected-item-is-correct/m-p/9702458#M10782</link>
    <description>&lt;LI-CODE lang="csharp"&gt;INT $i = size(explorer_selected_entities())
IF $i &amp;gt; 0 {
	ENTITY ent = explorer_selected_entities()[0]
	IF $ent.RootType != "ncprogram" {
		MESSAGE INFO "Entity type selected: " + $ent.RootType
		MACRO ABORT
	}
	ACTIVATE NCPROGRAM $ent
	FORM TEXT
	EDIT TEXTBLOCK 'Text10' QUIT
	TEXT ACCEPT
	EDIT NCPROGRAM $StopProg INSERT TEXTBLOCKS
	STRING Expande=pathname(entity('ncprogram',''))
	EXPLORER SELECT NCPROGRAM $Expande NEW
	DEBUG EXPLORER KEY RIGHT
} ELSE {
	MESSAGE WARN "No ncprogram selected."
	MACRO ABORT
}&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 20 Aug 2020 14:11:51 GMT</pubDate>
    <dc:creator>rafael.sansao</dc:creator>
    <dc:date>2020-08-20T14:11:51Z</dc:date>
    <item>
      <title>Run the macro only if the selected item is correct</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-the-macro-only-if-the-selected-item-is-correct/m-p/9702424#M10781</link>
      <description>&lt;P&gt;Hi, as the title suggests, I wanted the macro to run only if the entity is correct.&lt;BR /&gt;I enclose what I tried to do, they look around on the Forum.&lt;BR /&gt;Specifically, I will insert the same block of text (which would be a stop) on all paths of a selected NC program.&lt;BR /&gt;If the selected entity is wrong, I wanted a message. If no entity is selected, I wanted another message.&lt;BR /&gt;Thank you all.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 14:02:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-the-macro-only-if-the-selected-item-is-correct/m-p/9702424#M10781</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-08-20T14:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Run the macro only if the selected item is correct</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-the-macro-only-if-the-selected-item-is-correct/m-p/9702458#M10782</link>
      <description>&lt;LI-CODE lang="csharp"&gt;INT $i = size(explorer_selected_entities())
IF $i &amp;gt; 0 {
	ENTITY ent = explorer_selected_entities()[0]
	IF $ent.RootType != "ncprogram" {
		MESSAGE INFO "Entity type selected: " + $ent.RootType
		MACRO ABORT
	}
	ACTIVATE NCPROGRAM $ent
	FORM TEXT
	EDIT TEXTBLOCK 'Text10' QUIT
	TEXT ACCEPT
	EDIT NCPROGRAM $StopProg INSERT TEXTBLOCKS
	STRING Expande=pathname(entity('ncprogram',''))
	EXPLORER SELECT NCPROGRAM $Expande NEW
	DEBUG EXPLORER KEY RIGHT
} ELSE {
	MESSAGE WARN "No ncprogram selected."
	MACRO ABORT
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 20 Aug 2020 14:11:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-the-macro-only-if-the-selected-item-is-correct/m-p/9702458#M10782</guid>
      <dc:creator>rafael.sansao</dc:creator>
      <dc:date>2020-08-20T14:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Run the macro only if the selected item is correct</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-the-macro-only-if-the-selected-item-is-correct/m-p/9703822#M10783</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Fantastic thank you so much&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 04:31:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-the-macro-only-if-the-selected-item-is-correct/m-p/9703822#M10783</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-08-21T04:31:23Z</dc:date>
    </item>
  </channel>
</rss>

