moniz Posted September 13, 2012 Posted September 13, 2012 (edited) SOLVED MY bad! i had a method that was creating an instance of the AcadApplication(). Hi. i've this code to run open the autocad or to check if it is opened public AcadApplication abrirApp() { try //get a running AutoCAD instance if avaialbale { app = (AcadApplication)System.Runtime.InteropServices.Marshal.GetActiveObject(sAcadID); } catch //none found so start a new instance { System.Type AcadProg = System.Type.GetTypeFromProgID(sAcadID); app = (AcadApplication)System.Activator.CreateInstance(AcadProg); } if (app != null) { app.Visible = true; //could leave this false to hide Acad from the user } return app; } and everytime i run it even if the app is running i get another acad.exe being runned. it's doesn't open a new application just the exe. Anyway around it? Thanks Edited September 14, 2012 by moniz Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.