If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

C# Code for Autocad

I'm hoping this is a good place to come to get help with C#, no matter what API it's used with. I am trying to learn C# for personal use with Autodesk's Autocad. There are forums for Autocad specific questions, but only a very few who know the API are helpful...the rest are total pricks. I'm really hoping C# programmers in this forum would be willing to offer better input. I've written the following code. Please offer any advice you are willing to give. If not, thank you anyway.

Re: C# Code for Autocad

You are going to need to be a bit more specific on what you are looking for. First of all, does the code you posted work? If it does work, what are you looking for in terms of advice? Structure? Layout? Different approach? What don't you like about your code?

Re: C# Code for Autocad

Originally Posted by Arjay

You are going to need to be a bit more specific on what you are looking for. First of all, does the code you posted work? If it does work, what are you looking for in terms of advice? Structure? Layout? Different approach? What don't you like about your code?

Thanks. The code works. Looking for advice on areas that might stand out being not "standard practice" in regards to C# coding. If it's impossible to know that without know the API then I might be SOL :/

Re: C# Code for Autocad

Critiquing the code is a bit difficult without fully knowing the requirements of the code and how robust it needs to be. That being said, here are a few general comments:

Your while(true) loop may be a bit of a concern. Is it important to recover from a non-Ok status and continue? If so, you may want to move the try/catch block inside the while loop.

Is the BCCGRS() method run inside a secondary thread? If so, pay attention to marking the thread as IsBackground = true; otherwise, you may run into trouble when shutting down the app (i.e. a while loop inside an IsBackGround = false thread may prevent the app from shutting down cleanly).

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.