Пример #1
0
        // // // // // // // // // // // // // // // //

        //CatiaControl


        private void CatiaControl()
        {
            try
            {
                CatiaConnection cc = new CatiaConnection();

                // Finde Catia Prozess
                if (cc.CATIALaeuft())
                {
                    Console.WriteLine("0");

                    // Öffne ein neues Part
                    cc.ErzeugePart();


                    // Erstelle eine Skizze
                    cc.ErstelleLeereSkizze();


                    // Generiere ein Profil
                    cc.Stirnzahnrad(av);
                }
                else
                {
                    Console.WriteLine("Laufende Catia Application nicht gefunden");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Exception aufgetreten");
            }
            Console.WriteLine("Fertig - Taste drücken.");
        }
Пример #2
0
        //Programm Catia öffnen
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            CatiaConnection cc = new CatiaConnection();

            if (cc.CATIALaeuft())
            {
                MessageBox.Show("Catia wurde bereits gestartet.");
            }
            else
            {
                Process StarteCatia = new Process();
                StarteCatia.StartInfo.FileName = "CNext.exe";
                StarteCatia.Start();
            }
        }