Your Products have been synced, click here to refresh
You have to add INTEROP.PCDLRN.DLL (in your PC-DMIS root install folder) as a reference/resource and you can use the Object Editor (in visual studio) to explore the various methods.
What version of PC-DMIS are you running? Go to C:\Program Files\Hexagon\***Your Version of PC-DMIS***\en and open "automationobjects.chm". That should give you a starting point in learning the various objects/methods/events. Then it'll be up to your imagination and your skills in C# for the most part.
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("I:\\CMM - 4.5.4 SF\\Programs\\Injection - Keyed.PRG", "CMM1");//open a program richTextBox1.Text += "Program Opened \n"; //Saves as new parts part number bool didSave = pgm.SaveAs("I:\\CMM - 4.5.4 SF\\TestPrograms\\HP0375-TEST.PRG"); //save as at location if (didSave) { richTextBox1.Text += "Saved as HP0377-TEST \n"; } else { richTextBox1.Text += "Error saving \n"; } //Imports cad at file path pgm.Import("Z:\\CNC_Programing\\Powershape\\Cavity _Tops\\Models\\HP0375.step"); //imports cad at file location pgm.Save(); //saves file
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |