[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "FindWindowA", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)] public static extern long FindWindow(StringBuilder lpClassName, StringBuilder lpWindowName); F_hwnd = 0; //Reset Form Handler r_count = 0; //Reset retry count if (myCommand == "STL Import") //because the window name is Import { myCommand = "Import"; } StringBuilder mc = new StringBuilder(myCommand); catiaCore.GetSetCatia.StartCommand(myCommand); //Searching for Import window while (!(F_hwnd != 0 || (r_count == Retry_fail))) { F_hwnd = FindWindow(null, mc);//get Import window handler – If Import window is found F_hwnd!=0 catiaCore.GetSetCatia.ActiveWindow.ActiveViewer.Update();//! r_count = r_count + 1; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)