hexagon logo

How do i do "program start button" by C# in PC-DMIS?

Hi everyone,

It's my first time here to ask question,


Question:

I am trying to use c# to write a brief code in order to execute "Program start" in PC-DMIS, it's means I don't want to press the "start button" by mouse. Shawn on the picture-1 below.

But I have no idea which function in "PCDLRN" is what I want, and don't know how to test those function. Shawn on the picture-2 below .

Does anyone can help me to achieve the goal?

Thanks a lot.


Best regard  ​​​​


(picture-1)


  ​​
(picture-2)
Parents
  • I've been teaching myself the ins and outs of PCDMIS via C# what I can without any good documentation so I figured I'd leave a reply for anyone else that comes across this.

    PCDLRN.Application App = new PCDLRN.Application();//this works pc-dmis is open
    App.Visible = true;//pc-dmis is visible
    App.SetActive();
    
    IPartPrograms PCDPrograms =App.PartPrograms;
    
    //Opens base program
    IPartProgram pgm = PCDPrograms.Open("your\\file\\location.PRG", "CMM1"); //opens program
    pgm.AsyncExecute(); // executes program async
    //or
    pgm.EXECUTE(); // executes program
    
Reply
  • I've been teaching myself the ins and outs of PCDMIS via C# what I can without any good documentation so I figured I'd leave a reply for anyone else that comes across this.

    PCDLRN.Application App = new PCDLRN.Application();//this works pc-dmis is open
    App.Visible = true;//pc-dmis is visible
    App.SetActive();
    
    IPartPrograms PCDPrograms =App.PartPrograms;
    
    //Opens base program
    IPartProgram pgm = PCDPrograms.Open("your\\file\\location.PRG", "CMM1"); //opens program
    pgm.AsyncExecute(); // executes program async
    //or
    pgm.EXECUTE(); // executes program
    
Children
No Data