Your Products have been synced, click here to refresh
You don't show , and it is rather important how you open the part program. You have to tell PC-DMIS which machine the program should run on (or OFFLINE).
From my own barcode pp starter programmed in Delphi Pascal:
PCD_PartProgram := PCD_PartPrograms.Open(LocalFileName, [COLOR=#0000FF][B]'CMM1'[/B][/COLOR]);
Also, only one PP can have the machine, normally the one you open first. Opening two PP:s in PC-DMIS will open the second one offline, so you need to make sure there are no other PP:s open, before you open the one you want to run.
while (PCD_PartPrograms.Count > 0) do begin PCD_PartProgram := PCD_Application.ActivePartProgram; if not VarIsEmpty(PCD_PartProgram) then begin PCD_PartProgram.Close; PCD_PartProgram := null; end end;
private void initPCDMIS(FileInfo tempPrg, out PCDLRN.Application PCDApp, out IPartPrograms PCDPartPrograms, out PartProgram pcdActivePart) { PCDApp = new PCDLRN.Application(); // fetch the PC-DMIS application PCDPartPrograms = PCDApp.PartPrograms; // set up partprograms //THE MACHINE IS DEFINED IN App.config. (CMM1 or offline) string machine_name = ConfigurationManager.AppSettings["machine"]; PCDPartPrograms.Open(tempPrg.FullName, machine_name); // have PC-DMIS open the PRG pcdActivePart = PCDApp.ActivePartProgram; pcdMachine = PCDApp.ActivePartProgram.ActiveMachine; Thread.Sleep(100); PCDLRN.ExecutionWindow ew = pcdActivePart.GetExecutionWindow(0); ew.Top = 1; Thread.Sleep(100); }
You don't show , and it is rather important how you open the part program. You have to tell PC-DMIS which machine the program should run on (or OFFLINE).
From my own barcode pp starter programmed in Delphi Pascal:
PCD_PartProgram := PCD_PartPrograms.Open(LocalFileName, [COLOR=#0000FF][B]'CMM1'[/B][/COLOR]);
Also, only one PP can have the machine, normally the one you open first. Opening two PP:s in PC-DMIS will open the second one offline, so you need to make sure there are no other PP:s open, before you open the one you want to run.
while (PCD_PartPrograms.Count > 0) do begin PCD_PartProgram := PCD_Application.ActivePartProgram; if not VarIsEmpty(PCD_PartProgram) then begin PCD_PartProgram.Close; PCD_PartProgram := null; end end;
private void initPCDMIS(FileInfo tempPrg, out PCDLRN.Application PCDApp, out IPartPrograms PCDPartPrograms, out PartProgram pcdActivePart) { PCDApp = new PCDLRN.Application(); // fetch the PC-DMIS application PCDPartPrograms = PCDApp.PartPrograms; // set up partprograms //THE MACHINE IS DEFINED IN App.config. (CMM1 or offline) string machine_name = ConfigurationManager.AppSettings["machine"]; PCDPartPrograms.Open(tempPrg.FullName, machine_name); // have PC-DMIS open the PRG pcdActivePart = PCDApp.ActivePartProgram; pcdMachine = PCDApp.ActivePartProgram.ActiveMachine; Thread.Sleep(100); PCDLRN.ExecutionWindow ew = pcdActivePart.GetExecutionWindow(0); ew.Top = 1; Thread.Sleep(100); }
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |