hexagon logo

Got Visual Studio and the Interop.PCDLRN.dll... Now what?

As I upgraded one CMM to Windows 7 64-bit, my small VBS helpers died in the process (still kickin' butt on XP though).
So, I have begun re-coding them in Visual Studio 2010 (I think). I have gotten so far in the coding where I need to connect to PC-DMIS and start interfacing with it. Now, I managed to find the DLL that is supposed to expose some interfaces and methods and I have successfully added it to my project.

Then what? How do I use the DLL to connect to PC-DMIS and expose the PartPrograms collection for instance?

Oh, I am using C# for this...

Any and all input, examples or suggestions are VERY welcome!

TIA!
Parents
  • Yep, I added the DLL through "Add reference" in the top-right corner.

    This is the snippet where I try to connect to PC-DMIS, but it gives me the "PC-DMIS needs to be started" no matter what...
    It doesn't matter if the DLL is present or not...

    if (openfiledialog1.ShowDialog() == DialogResult.OK)
                        {
                            try
                            {
                                PCDLRN.IApplication PCDApp = new PCDLRN.Application(); // fetch the PC-DMIS application
                                PCDLRN.IPartPrograms PCDPartPrograms = PCDApp.PartPrograms; // set up partprograms
                                PCDPartPrograms.Open(openfiledialog1.FileName, "CMM1"); // have PC-DMIS open the PRG
                                //PCDPartPrograms = null;
                                //PCDApp = null;
                            }
                            catch (Exception)
                            {
                                MessageBox.Show("PC-DMIS needs to be started!"); // PC-DMIS needs to be started!
                                Application.Exit(); // Exit
                            }
                        }
Reply
  • Yep, I added the DLL through "Add reference" in the top-right corner.

    This is the snippet where I try to connect to PC-DMIS, but it gives me the "PC-DMIS needs to be started" no matter what...
    It doesn't matter if the DLL is present or not...

    if (openfiledialog1.ShowDialog() == DialogResult.OK)
                        {
                            try
                            {
                                PCDLRN.IApplication PCDApp = new PCDLRN.Application(); // fetch the PC-DMIS application
                                PCDLRN.IPartPrograms PCDPartPrograms = PCDApp.PartPrograms; // set up partprograms
                                PCDPartPrograms.Open(openfiledialog1.FileName, "CMM1"); // have PC-DMIS open the PRG
                                //PCDPartPrograms = null;
                                //PCDApp = null;
                            }
                            catch (Exception)
                            {
                                MessageBox.Show("PC-DMIS needs to be started!"); // PC-DMIS needs to be started!
                                Application.Exit(); // Exit
                            }
                        }
Children
No Data