Exemplo n.º 1
0
        private static void OpenMenu(string id)
        {
            var handle = CatiaApp.GetHandle();

            AutomationElement root = AutomationElement.FromHandle(handle);

            root.FindByIdExt(id).PressButtonExt();

            Thread.Sleep(200);
        }
Exemplo n.º 2
0
        public static void CheckPrerequsites()
        {
            CatiaApp.ToFront();

            if (!CatiaApp.IsForemost())
            {
                throw new Exception("Not all prerequsites are fullfilled to run this command");
            }

            //var bench = Workbench.GetWorkbenchId();
            //Debug.WriteLine("Current workbench: " + bench);

            Workbench.SwitchWorkbench(Workbench.Workbenches._3DCS);
        }