<?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 Get ProcessID Issue. in PowerShape and PowerMill API Forum</title>
    <link>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7951288#M1029</link>
    <description>&lt;P&gt;I Open two PowerMILL 2017. and I can see the process ids are 6416 and 11828.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="Pm Process ID.png" style="width: 807px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/491832i064C1E4B90BE5B44/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pm Process ID.png" alt="Pm Process ID.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I use the PMAutomation.GetListOfPmComObjects() method to get the PmComOberjects and read then Property ProcessID is PMAutomation.&lt;/P&gt;&lt;P&gt;All the Process Id are reutrn the first instance id. not the right one.&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="Get PM Instances.png" style="width: 581px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/491833i58039CA9A69147DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Get PM Instances.png" alt="Get PM Instances.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is my code&lt;/P&gt;&lt;PRE&gt;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Autodesk.ProductInterface;
using Autodesk.ProductInterface.PowerMILL;

namespace PMAutomaticTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private List&amp;lt;PMAutomation&amp;gt; PMAutoLists = new List&amp;lt;PMAutomation&amp;gt;();
        private void button1_Click(object sender, EventArgs e)
        {
            List&amp;lt;object&amp;gt; lisCom  = PMAutomation.GetListOfPmComObjects();
            foreach (var item in lisCom)
            {
                this.PMAutoLists.Add(new PMAutomation(item));
            }

            //var firstAuto = (PMAutomation)PMAutoLists.First&amp;lt;PMAutomation&amp;gt;();
            //firstAuto.IsVisible = false;
            //MessageBox.Show("Done");

            foreach (var pm in PMAutoLists)
            {
                this.listBox1.Items.Add(string.Format("PM:{0} ProcessID:{1}", pm.MainWindowId, pm.ProcessId));
            }

        }
    }
}&lt;/PRE&gt;</description>
    <pubDate>Mon, 23 Apr 2018 02:16:02 GMT</pubDate>
    <dc:creator>hx</dc:creator>
    <dc:date>2018-04-23T02:16:02Z</dc:date>
    <item>
      <title>Get ProcessID Issue.</title>
      <link>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7951288#M1029</link>
      <description>&lt;P&gt;I Open two PowerMILL 2017. and I can see the process ids are 6416 and 11828.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="Pm Process ID.png" style="width: 807px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/491832i064C1E4B90BE5B44/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pm Process ID.png" alt="Pm Process ID.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I use the PMAutomation.GetListOfPmComObjects() method to get the PmComOberjects and read then Property ProcessID is PMAutomation.&lt;/P&gt;&lt;P&gt;All the Process Id are reutrn the first instance id. not the right one.&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="Get PM Instances.png" style="width: 581px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/491833i58039CA9A69147DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Get PM Instances.png" alt="Get PM Instances.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is my code&lt;/P&gt;&lt;PRE&gt;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Autodesk.ProductInterface;
using Autodesk.ProductInterface.PowerMILL;

namespace PMAutomaticTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private List&amp;lt;PMAutomation&amp;gt; PMAutoLists = new List&amp;lt;PMAutomation&amp;gt;();
        private void button1_Click(object sender, EventArgs e)
        {
            List&amp;lt;object&amp;gt; lisCom  = PMAutomation.GetListOfPmComObjects();
            foreach (var item in lisCom)
            {
                this.PMAutoLists.Add(new PMAutomation(item));
            }

            //var firstAuto = (PMAutomation)PMAutoLists.First&amp;lt;PMAutomation&amp;gt;();
            //firstAuto.IsVisible = false;
            //MessageBox.Show("Done");

            foreach (var pm in PMAutoLists)
            {
                this.listBox1.Items.Add(string.Format("PM:{0} ProcessID:{1}", pm.MainWindowId, pm.ProcessId));
            }

        }
    }
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Apr 2018 02:16:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7951288#M1029</guid>
      <dc:creator>hx</dc:creator>
      <dc:date>2018-04-23T02:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get ProcessID Issue.</title>
      <link>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7952581#M1030</link>
      <description>&lt;P&gt;Hi, I can see that this is the case.&amp;nbsp; Unfortunately it is not possible to query PowerMill to find out its process id.&amp;nbsp; We attempt to guess it at present but obviously this does not work.&amp;nbsp; I can request this functionality to be added to PowerMill but I am not sure where it will fit in their development priorities.&lt;/P&gt;
&lt;P&gt;How do you plan to use the Process Id?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 13:36:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7952581#M1030</guid>
      <dc:creator>luke.edwards.autodesk</dc:creator>
      <dc:date>2018-04-23T13:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get ProcessID Issue.</title>
      <link>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7954359#M1031</link>
      <description>&lt;P&gt;Users can be distinguished by process id intuitively, which PowerMILL process is currently associated&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 02:12:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7954359#M1031</guid>
      <dc:creator>hx</dc:creator>
      <dc:date>2018-04-24T02:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get ProcessID Issue.</title>
      <link>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7957864#M1032</link>
      <description>&lt;P&gt;I have created a Pull Request on the open source to resolve this issue:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Autodesk/PowerShapeAndPowerMillAPI/pull/9" target="_blank"&gt;https://github.com/Autodesk/PowerShapeAndPowerMillAPI/pull/9&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We will get it pulled, built and a new beta version with this fix in should be available through NuGet later today or tomorrow.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 09:11:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powershape-and-powermill-api/get-processid-issue/m-p/7957864#M1032</guid>
      <dc:creator>luke.edwards.autodesk</dc:creator>
      <dc:date>2018-04-25T09:11:17Z</dc:date>
    </item>
  </channel>
</rss>

