Good morning, All
I am incurring a fatal error while i am running a plugin i have developed in .NET. I am using AutoCAD 2012 and .NET 4.0. Where the fatal error occurs is when i am filtering a list for specific colors and specific linetypes to populate a listbox with. I did a quite a bit of reading and the only thing i have found is ( in debug compiler is giving a little more memory space for said collection and when i run it in outside of debug it is not. ) Now i dont really understand how to fix this issue or can verify that it really is the issue. is there some type of setting i can change inside of autocad for debugging so it doesn't completely shut down? i need to atleast try to find out exactly why it is failing and what i can do to fix it.
I tried to upload a zip of my project bt it is to large, I will be more than happy to attach the files that i am able to.
Thanks in advance..
Trae
Solved! Go to Solution.
@Anonymous wrote:i need to atleast try to find out exactly why it is failing and what i can do to fix it.
I tried to upload a zip of my project bt it is to large, I will be more than happy to attach the files that i am able to.
Hi Trae,
If you're not already doing so, add a Try/Catch block to your code... Example:
void FOO() { Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; try { //<-- your code here } catch (System.Exception ex) { ed.WriteMessage("\n; error: {0}\n", ex.Message); } }
Also, you can always post your code directly in your post, using the 'Insert Code' button (next to the Paste from Word button).
Cheers
"How we think determines what we do, and what we do determines what we get."
The issue was with WPF, I set the GroupName in XAML for a few radio buttons. Apparently it didn't like that. So by removing the GroupName the problem has been fixed.
Thanks for posting your solution, for others to find.
Cheers
"How we think determines what we do, and what we do determines what we get."
BlackBox,
I did implement a few try/catch statments, But the error would close autocad and not give me any feed back... I don't know why the GroupName property inside my XAML was making it fail like that.. I guess it reads from a different thread. Im not very clear on that. I am going to post the question to StackOverflow and see if i can get an answer.
Thanks for your help though.
Trae
@Anonymous wrote:BlackBox,
I did implement a few try/catch statments, But the error would close autocad and not give me any feed back...
Try adding a break point at your call to ed.WriteMessage()... Stepping through should also be something to consider when debugging.
Cheers
"How we think determines what we do, and what we do determines what we get."
Can't find what you're looking for? Ask the community or share your knowledge.