Message 1 of 14
Autocad commands not executing in time.

Not applicable
11-30-2009
12:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a c# application. If i net load it in autocad it will show a modal dialog. If i press a button in that form, it should hide and it should open a dwg file in autocad. and after opening i wrote the code to show another modal dialog.
My problem is if i click the button it will directly show the second form without opening the dwg file. It will open only if i close the second form.
Autocad commands is not executing in time. Can anyone suggest what may be the problem?
// commands.cs file
// This is how i am opening the dwg file
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.Open(filename, false);
// Here i am opening the second form.
objCreate = new CreateTemplate(std, filename, "Edit");
Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(objCreate);
thanks in advance
Jithin Edited by: jithin.dcs on Nov 30, 2009 8:58 AM
My problem is if i click the button it will directly show the second form without opening the dwg file. It will open only if i close the second form.
Autocad commands is not executing in time. Can anyone suggest what may be the problem?
// commands.cs file
// This is how i am opening the dwg file
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.Open(filename, false);
// Here i am opening the second form.
objCreate = new CreateTemplate(std, filename, "Edit");
Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(objCreate);
thanks in advance
Jithin Edited by: jithin.dcs on Nov 30, 2009 8:58 AM