Automation error while processing AutoCAD drawings from WPF

Automation error while processing AutoCAD drawings from WPF

s_abeed
Enthusiast Enthusiast
199 Views
0 Replies
Message 1 of 1

Automation error while processing AutoCAD drawings from WPF

s_abeed
Enthusiast
Enthusiast

I have a .NET C# AutoCAD Plugin that converts the content of the dwg file or read some information from DWG and report. Multiple commands are exposed to perform these operations.

 

I automated this C# Plugin to be get called from a plain c# console application by loading AutoCAD automation object and sending the commands and it was working fine.

 

Now I created a WPF application and  move the logic of console application to WPF and it was failing a lot of times. I have to add the code below before calling any of the AutoCAD commands

 

While (!GetACAD().GetAcadState().IsQuiescent)
Thread.Sleep(3000);

 

It improves the situation but not perfect and it still it fails on some drawing and then I rerun and it works fine.

 

For console this was never a problem.

 

Any idea or suggestion ?

 

0 Likes
200 Views
0 Replies
Replies (0)