Your Products have been synced, click here to refresh
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 } }
MessageBox.Show("PC-DMIS needs to be started!");
MessageBox.Show("ConnectPCDMIS : " & Exception.Message);
Dim app As PCDLRN.Application Dim cmds As PCDLRN.Commands Dim part As PCDLRN.PartProgram Set app = CreateObject("PCDLRN.Application") Set part = app.ActivePartProgram Set cmds = part.Commands
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static Type PCDLRN_Application = null; static dynamic PCDApp = null; static dynamic PCDParts = null; static dynamic PCDPart = null; static void Main(string[] args) { try { PCDLRN_Application = Type.GetTypeFromProgID("PCDLRN.Application"); PCDApp = System.Activator.CreateInstance(PCDLRN_Application); PCDApp.WaitUntilReady(60); System.Threading.Thread.Sleep(2000); PCDApp.OperatorMode = false; PCDApp.Visible = true; } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } Console.ReadLine(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static Type PCDLRN_Application = null; static PCDLRN.Application PCDApp = null; static PCDLRN.PartPrograms PCDParts = null; static PCDLRN.PartProgram PCDPart = null; static void Main(string[] args) { try { //PCDLRN_Application = Type.GetTypeFromProgID("PCDLRN.Application"); PCDApp = (PCDLRN.Application)Microsoft.VisualBasic.Interaction.CreateObject("PCDLRN.Application",""); PCDApp.WaitUntilReady(60); System.Threading.Thread.Sleep(2000); PCDApp.OperatorMode = false; PCDApp.Visible = true; } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } Console.ReadLine(); } } }
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |