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





  • i some how ended up back on this page, in the method "StartPCDMIS()", I noticed that i should have used a different command to check when PC-DMIS is ready... so here's the Edit:

    bool StartPCDMIS()
    {
    try
    {
    Type pcdObjType = Type.GetTypeFromProgID("PCDLRN.Application");
    this.pcdApp = Activator.CreateInstance(pcdObjType);
    
    int timeout = 100; // the number of seconds to wait...
    pcdApp.WaitUntilReady(timeout);
    
    
    return true; //pc-dmis started
    }
    catch
    {
    return false; // an error occured
    }
    }
    
    



    When I run these code snippets on the PC-DMIS machine, another instance of PC-DMIS Application is launched, and because we only have 1 seat, it fails with "Feature rejected (Terminal Server remote client not allowed). What is the code to test whether PC-DMIS is running, and connect to it if it is?
    Thks,
    z
Reply





  • i some how ended up back on this page, in the method "StartPCDMIS()", I noticed that i should have used a different command to check when PC-DMIS is ready... so here's the Edit:

    bool StartPCDMIS()
    {
    try
    {
    Type pcdObjType = Type.GetTypeFromProgID("PCDLRN.Application");
    this.pcdApp = Activator.CreateInstance(pcdObjType);
    
    int timeout = 100; // the number of seconds to wait...
    pcdApp.WaitUntilReady(timeout);
    
    
    return true; //pc-dmis started
    }
    catch
    {
    return false; // an error occured
    }
    }
    
    



    When I run these code snippets on the PC-DMIS machine, another instance of PC-DMIS Application is launched, and because we only have 1 seat, it fails with "Feature rejected (Terminal Server remote client not allowed). What is the code to test whether PC-DMIS is running, and connect to it if it is?
    Thks,
    z
Children
No Data