<?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 for Workplane at Pick Position on Block - Possible? in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8234056#M19562</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;You can do the calculation and transform the workplane.&lt;/SPAN&gt; Here is an example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;REAL $X = $Block.Limits.Xmin + (($Block.Limits.Xmax - $Block.Limits.Xmin) / 2)
REAL $Y = $Block.Limits.Ymin + (($Block.Limits.Ymax - $Block.Limits.Ymin) / 2)
REAL $Z = $Block.Limits.Zmax

CREATE WORKPLANE ; EDITOR
MODE COORDINPUT COORDINATES $X $Y $Z
MODE WORKPLANE_EDIT FINISH ACCEPT
ACTIVATE WORKPLANE #&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Aug 2018 23:02:48 GMT</pubDate>
    <dc:creator>rafael.sansao</dc:creator>
    <dc:date>2018-08-29T23:02:48Z</dc:date>
    <item>
      <title>Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8233796#M19561</link>
      <description>&lt;P&gt;Is it possible to&amp;nbsp;use&amp;nbsp;a macro to create a workplane that has its location defined by the standard pick points (orange, yellow, green), and work for different block sizes?&amp;nbsp; The pickpoints seem to be defined by their absolute location not location relative to the block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workplane location wouldn't have to be at the pick points,&amp;nbsp;as long as the location was always relative to the outer dimensions of the block.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Pick Points Shown" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/540501i48DC70756A7F686D/image-size/large?v=v2&amp;amp;px=999" role="button" title="WP_PickPoints.jpg" alt="Pick Points Shown" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Pick Points Shown&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When viewing the command window during picking points is shows the following line:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;[_PICK_21068_\r]&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;does anyone know what the number relates to, it changes for each point but seems a bit random.&lt;/P&gt;&lt;P&gt;Any help with this would be appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 20:27:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8233796#M19561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-29T20:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8234056#M19562</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;You can do the calculation and transform the workplane.&lt;/SPAN&gt; Here is an example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;REAL $X = $Block.Limits.Xmin + (($Block.Limits.Xmax - $Block.Limits.Xmin) / 2)
REAL $Y = $Block.Limits.Ymin + (($Block.Limits.Ymax - $Block.Limits.Ymin) / 2)
REAL $Z = $Block.Limits.Zmax

CREATE WORKPLANE ; EDITOR
MODE COORDINPUT COORDINATES $X $Y $Z
MODE WORKPLANE_EDIT FINISH ACCEPT
ACTIVATE WORKPLANE #&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Aug 2018 23:02:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8234056#M19562</guid>
      <dc:creator>rafael.sansao</dc:creator>
      <dc:date>2018-08-29T23:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8235770#M19563</link>
      <description>&lt;P&gt;Yes, there are commands to pick the coloured blobs whilst you're in the mode:&lt;/P&gt;
&lt;PRE&gt;MODE WORKPLANE_CREATE ; INTERACTIVE BLOCK
MODE WORKPLANE_CREATE BLOCK XMIN YMID ZMAX&lt;/PRE&gt;
&lt;P&gt;Obviously, the command takes an X, Y and Z value, and for each a MIN, MID or MAX modifier.&lt;/P&gt;
&lt;P&gt;I hope that helps.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 15:35:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8235770#M19563</guid>
      <dc:creator>peter.lockyer</dc:creator>
      <dc:date>2018-08-30T15:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8249974#M19564</link>
      <description>&lt;P&gt;I think this is definitely going to help, thank you , much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 14:08:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8249974#M19564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-06T14:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8250843#M19565</link>
      <description>&lt;P&gt;Hi Raphael,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a couple of questions......&lt;/P&gt;&lt;P&gt;When I try to create a second WP with different values&amp;nbsp;i get several errors "&lt;FONT color="#808080"&gt;&lt;EM&gt;local variable already defined: x&lt;/EM&gt;&lt;/FONT&gt;" y, z, .&lt;/P&gt;&lt;P&gt;any tips for getting past this? seems like i would need to define a new variable but not sure how to label them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also when I try to rename the WP&lt;/P&gt;&lt;PRE&gt;EXPLORER SELECT Workplane "Workplane\1" NEW 
RENAME Workplane "1" "TOP MID"&lt;/PRE&gt;&lt;P&gt;it only works if I paste it into the command line as a separate function, rather then adding it to the other code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is one of my first experiments with writing macros, so that's probably half the problem!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 19:00:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8250843#M19565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-06T19:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8250888#M19566</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;You can create the Workplane with the correct name.&lt;/SPAN&gt; &lt;SPAN&gt;It is not necessary to rename.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the second workplane, you can not declare the variables again.&lt;/SPAN&gt;&lt;BR /&gt;Check out the example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;// First Workplane
REAL $X = $Block.Limits.Xmin + (($Block.Limits.Xmax - $Block.Limits.Xmin) / 2)
REAL $Y = $Block.Limits.Ymin + (($Block.Limits.Ymax - $Block.Limits.Ymin) / 2)
REAL $Z = $Block.Limits.Zmax

CREATE WORKPLANE "TOP MID" EDITOR
MODE COORDINPUT COORDINATES $X $Y $Z
MODE WORKPLANE_EDIT FINISH ACCEPT
ACTIVATE WORKPLANE #

// Second Workplane
$X = $Block.Limits.Xmin + (($Block.Limits.Xmax - $Block.Limits.Xmin) / 2)
$Y = $Block.Limits.Ymin + (($Block.Limits.Ymax - $Block.Limits.Ymin) / 2)
$Z = $Block.Limits.Zmin

CREATE WORKPLANE "BOTTON MID" EDITOR
MODE COORDINPUT COORDINATES $X $Y $Z
MODE WORKPLANE_EDIT FINISH ACCEPT
ACTIVATE WORKPLANE #&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Sep 2018 19:14:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8250888#M19566</guid>
      <dc:creator>rafael.sansao</dc:creator>
      <dc:date>2018-09-06T19:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251132#M19567</link>
      <description>&lt;P&gt;Thanks again for your help Raphael,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to remove this line:&lt;/P&gt;&lt;PRE&gt;ACTIVATE WORKPLANE #&lt;/PRE&gt;&lt;P&gt;then it to work as anticipated otherwise the&amp;nbsp; second WP&amp;nbsp;seems to be calculated from the previous&amp;nbsp;WP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 21:23:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251132#M19567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-06T21:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251359#M19568</link>
      <description>&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;That's right.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 23:18:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251359#M19568</guid>
      <dc:creator>rafael.sansao</dc:creator>
      <dc:date>2018-09-06T23:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251366#M19569</link>
      <description>&lt;P&gt;Raphael,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is working really well for me, I was able to have the WP change location relative to block size, and also added some code to orientate the WP.&amp;nbsp; This is a great platform for me to expand upon.&amp;nbsp; I'm planning to add some additional clearance WP's for transitional movements between toolpaths.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for helping us!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached my macro for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 23:23:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251366#M19569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-06T23:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Workplane at Pick Position on Block - Possible?</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251370#M19570</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Very good.&lt;/SPAN&gt; &lt;SPAN&gt;Congratulations on your work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;If your question has been answered, mark the answer as "accepted solution"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 23:26:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-for-workplane-at-pick-position-on-block-possible/m-p/8251370#M19570</guid>
      <dc:creator>rafael.sansao</dc:creator>
      <dc:date>2018-09-06T23:26:51Z</dc:date>
    </item>
  </channel>
</rss>

