private static void OpenMenu(string id) { var handle = CatiaApp.GetHandle(); AutomationElement root = AutomationElement.FromHandle(handle); root.FindByIdExt(id).PressButtonExt(); Thread.Sleep(200); }
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); }