<?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 Macros with Visual Basic or With Windows via .Bat File in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9627232#M11353</link>
    <description>&lt;P&gt;Hi I wanted to ask you for more information as you understand it. I managed to do what I wanted or create a drop-down interface where when I press it executes the macro but I would like to put the macros inside RESOURCES to be able to create an exe with everything inside without needing external files. I use VB.net and this is the button:&lt;/P&gt;&lt;P&gt;Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click&lt;BR /&gt;Dim macro = powerMill.LoadMacro(New Autodesk.FileSystem.File("C:\Program Files\Autodesk\pmill4\Macro\Crea Icona Anteprima Powermill_Moo0Converter.mac"))&lt;BR /&gt;macro.RunComplete()&lt;BR /&gt;End Sub&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2020 21:17:33 GMT</pubDate>
    <dc:creator>HMC400</dc:creator>
    <dc:date>2020-07-09T21:17:33Z</dc:date>
    <item>
      <title>Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9578110#M11346</link>
      <description>&lt;P&gt;Hi Guys, there is a way to run a macro from an application created with Visual Basic, where I press a button and run a macro.&lt;BR /&gt;Or run a macro from Windows with a .bat file?&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2020 15:25:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9578110#M11346</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-06-13T15:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580183#M11347</link>
      <description>&lt;P&gt;you can use the PowerMill API or make a plugin to run macros from a button. The API can be worked into a VB application that runs outside powermill, but is limited to the first open session of powermill, meaning if you have three pmill sessions open, the API will only execute commands in the first one (unless they've updated it). By using a plugin, you can use that plugin in each open session. A plugin is a little more work on the front end, but it's worth it if you run multiple sessions in powermill.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the scope of your VB app?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 13:26:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580183#M11347</guid>
      <dc:creator>TK.421</dc:creator>
      <dc:date>2020-06-15T13:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580250#M11348</link>
      <description>&lt;P&gt;Unfortunately, I don't know where to create a plugin. I state that I usually only work with an open Powermill session.&lt;BR /&gt;I have several macros and I wanted to create a menu with buttons where each button corresponds to a macro. in VB it's easy to create a button but I can't write the correct code. If you can also help me with a plugin I would be grateful.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 14:01:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580250#M11348</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-06-15T14:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580341#M11349</link>
      <description>&lt;P&gt;if you only use one powermill session at a time, then the API would be a better tool to use. You can find the documentation on the &lt;A href="https://forums.autodesk.com/t5/powershape-and-powermill-api/bd-p/298" target="_blank" rel="noopener"&gt;Powermill/Powershape API forum&lt;/A&gt;, &lt;A href="https://forums.autodesk.com/t5/powershape-and-powermill-api/getting-started-with-powershape-and-powermill-api/td-p/6868839" target="_blank" rel="noopener"&gt;this pos&lt;/A&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;A href="https://forums.autodesk.com/t5/powershape-and-powermill-api/getting-started-with-powershape-and-powermill-api/td-p/6868839" target="_blank" rel="noopener"&gt;t&lt;/A&gt; in particular. If you have an existing Visual Studio project, it is easy to add the necessary code to connect to powermill.&amp;nbsp; The documentation in the linked post is easy enough to read that even a feeble-minded person like myself was able to make sense and use of it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feel free to post on that forum with API questions. As for plugins, they've made it clear that those questions belong on this forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's plugin documentation located here: C:\Program Files\Autodesk\PowerMill 21.0.30\file\plugins\documentation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plugins are a bit more work up front, but worth the effort. If you choose to go this route, pm me and I can help you a bit more.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 14:37:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580341#M11349</guid>
      <dc:creator>TK.421</dc:creator>
      <dc:date>2020-06-15T14:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580391#M11350</link>
      <description>&lt;P&gt;OK thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 14:59:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580391#M11350</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-06-15T14:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580604#M11351</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5564437"&gt;@HMC400&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you looked into a Explorer user menu for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-06-15_1228.png" style="width: 483px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/783816i5B32C768F1DEAC7E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-06-15_1228.png" alt="2020-06-15_1228.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a XML file that will store commands and macro's in a RMB menu from the Explorer.&amp;nbsp; The only thing is, you cannot add icons to this menu....just text.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 16:31:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9580604#M11351</guid>
      <dc:creator>ChristopherMarion</dc:creator>
      <dc:date>2020-06-15T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9581625#M11352</link>
      <description>&lt;P&gt;Thanks for the reply. Yes I know him.&lt;BR /&gt;User_menu.xlm, I also know Explorer.ppm and Default.ppm. It seemed like a nice alternative to try.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 05:41:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9581625#M11352</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-06-16T05:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9627232#M11353</link>
      <description>&lt;P&gt;Hi I wanted to ask you for more information as you understand it. I managed to do what I wanted or create a drop-down interface where when I press it executes the macro but I would like to put the macros inside RESOURCES to be able to create an exe with everything inside without needing external files. I use VB.net and this is the button:&lt;/P&gt;&lt;P&gt;Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click&lt;BR /&gt;Dim macro = powerMill.LoadMacro(New Autodesk.FileSystem.File("C:\Program Files\Autodesk\pmill4\Macro\Crea Icona Anteprima Powermill_Moo0Converter.mac"))&lt;BR /&gt;macro.RunComplete()&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 21:17:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9627232#M11353</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-07-09T21:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9627250#M11354</link>
      <description>&lt;P&gt;this is what I do for my plugins:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;add the folder containing your macros to your visual studio project:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture.PNG" style="width: 422px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/793666i0FCC2528CC201E24/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then select all the macros in that folder and change the&lt;/P&gt;
&lt;P&gt;Build Action to 'Content', and Copy to Output Directory to 'Copy Always'&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 455px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/793667i9D7779135EAEB52A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 21:30:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9627250#M11354</guid>
      <dc:creator>TK.421</dc:creator>
      <dc:date>2020-07-09T21:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9627783#M11355</link>
      <description>&lt;P&gt;Thanks for the reply. Ok I think I understand but then when you call the macro you always use the same instruction?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dim macro = powerMill.LoadMacro(New Autodesk.FileSystem.File("C:\Program Files\Autodesk\pmill4\Macro\Crea Icona Anteprima Powermill_Moo0Converter.mac"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;macro.RunComplete()&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 05:46:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9627783#M11355</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-07-10T05:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9628409#M11356</link>
      <description>&lt;P&gt;yes, to run a macro you always use the same commands. you could create a class to help simplify that a little, but in the end, it is always that code that will call and run the macro in powermill.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you're using a plugin rather than the API the code is only one line; and even what I have here can be simplified, but I am a hack programmer not a professional. I find something that works and then move on.&amp;nbsp; &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7461571"&gt;@Sean570&lt;/a&gt; really knows this stuff better.&lt;BR /&gt;&amp;nbsp;m_services.DoCommand(m_token, "MACRO 'C:/macro_path.mac'");&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9628409#M11356</guid>
      <dc:creator>TK.421</dc:creator>
      <dc:date>2020-07-10T12:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macros with Visual Basic or With Windows via .Bat File</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9628438#M11357</link>
      <description>&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:37:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/run-macros-with-visual-basic-or-with-windows-via-bat-file/m-p/9628438#M11357</guid>
      <dc:creator>HMC400</dc:creator>
      <dc:date>2020-07-10T12:37:52Z</dc:date>
    </item>
  </channel>
</rss>

