Author Topic: VB dot sharp?  (Read 16412 times)

0 Members and 1 Guest are viewing this topic.

Bob Wahr

  • Guest
VB dot sharp?
« on: June 02, 2006, 04:32:11 PM »
Many of you are all too familiar with my programming (dis)abilities which should help you answer my question.

I've decided that it's time to bite the bullet and start doing this .net stuff.  OK, it's been on my to do list for quite some time, I just haven't really had the time to devote, or the project to do it on.  Do you (yes, if you're reading this, I'm talking to you) think that I should go with some VB .net or should I go more towards the ARX of the C#venant?

TR

  • Guest
Re: VB dot sharp?
« Reply #1 on: June 02, 2006, 04:35:04 PM »
C#.

Bob Wahr

  • Guest
Re: VB dot sharp?
« Reply #2 on: June 02, 2006, 04:38:54 PM »
As they creep a little higher.

How much harder will C# be than VB .net coming from a VBAVB direction?

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: VB dot sharp?
« Reply #3 on: June 02, 2006, 04:58:57 PM »
Do you (yes, if you're reading this, I'm talking to you) think that I should go with some VB .net or should I go more towards the ARX of the C#venant?
Either will work.  In fact you've got quite a few more choices than just VB & C#.  Here's a site that I just found with a quick google search http://dotnetpowered.com/languages.aspx

I believe that most of the regulars in the swamp prefer C# (I do), but that is *completely* opposite of what I've found with acad developers in general.

How much harder will C# be than VB .net coming from a VBAVB direction?
Learning language syntax is the easy part  :evil:
Bobby C. Jones

TR

  • Guest
Re: VB dot sharp?
« Reply #4 on: June 02, 2006, 05:00:06 PM »
IMHO VB.NET isn't that similiar to VB/VBA at all. You're better off with C#.

Draftek

  • Guest
Re: VB dot sharp?
« Reply #5 on: June 02, 2006, 05:18:03 PM »
I migrated to C#, from VB/VBA and I don't want to go back.

But as Bobby mentioned in the other post, don't bite off a big project. I had to throw away 3 months of work and start over recently.....

LE

  • Guest
Re: VB dot sharp?
« Reply #6 on: June 02, 2006, 05:52:25 PM »
opposite of what I've found with acad developers in general.

Do you want to share what you found?  :-)

Bob Wahr

  • Guest
Re: VB dot sharp?
« Reply #7 on: June 02, 2006, 05:58:43 PM »
I assumed that they preferred VB.net

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: VB dot sharp?
« Reply #8 on: June 02, 2006, 06:18:02 PM »
I found C# to be a lot like VBA which made my transition very easy.  Being self taught in VBA and C#, I had a really hard time learning vba coming from LISP, but C# from VBA was really easy.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Bob Wahr

  • Guest
Hello World: Accessing ObjectARX .NET Wrappers
« Reply #9 on: June 02, 2006, 06:22:01 PM »
Dear Diary,

Downloaded the labs today.  Tomorrow I'm going to take them out for a ride.  Maybe we'll go to the zoo.

Swift

  • Swamp Rat
  • Posts: 596
Re: VB dot sharp?
« Reply #10 on: June 02, 2006, 06:33:25 PM »
I've just been learning c++ for 6 years, by the time I am comfortable and proficient with it, it will be obsolete.

Chuck Gabriel

  • Guest
Re: VB dot sharp?
« Reply #11 on: June 02, 2006, 06:43:46 PM »
I've just been learning c++ for 6 years, by the time I am comfortable and proficient with it, it will be obsolete.

Don't believe the hype!!  Besides, a lot of what you've been learning will be helpful in a variety of other languages including C#.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: VB dot sharp?
« Reply #12 on: June 02, 2006, 08:59:43 PM »
Learn them all Bob, you know you want to.


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: VB dot sharp?
« Reply #13 on: June 04, 2006, 03:25:13 AM »
C# definately! < snicker >

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: VB dot sharp?
« Reply #14 on: June 04, 2006, 11:44:00 AM »
opposite of what I've found with acad developers in general.

Do you want to share what you found?  :-)
At an ADN conference several years ago, when the acad .NET API was shiny and new, Microsoft had donated some C#.NET and some VB.NET books for adesk to give away.  The VB books went *fast*, the C# books where around for quite some time after the conference ended.  Although they all did eventually get snatched up.  This was my first exposure to this phenomenon.

Sometime after that I sat in on an adesk webcast on the .NET API.   They had a poll on what languages the attendees where using.  VB was the big winner.

And at all of my AU classes I have asked for a show of hands for who is using VB.NET and who is using C#.  The overwhelming majority is always VB.  But I still do all my examples in C#  :evil:  (I may include some VB examples this year)

Modified: Removed "if they accept my proposal for ".  Yeah!
« Last Edit: June 05, 2006, 11:26:58 AM by Bobby C. Jones »
Bobby C. Jones

LE

  • Guest
Re: VB dot sharp?
« Reply #15 on: June 05, 2006, 10:44:36 AM »
Thanks;

I have done in the past very little in VB or VBA, I never liked, have no idea why, I am close to two years writing in C++ and ARX and very little on MFC, I feel good now basically with C++/ARX, but for what I have seen very few are staying on this boat.

I have not being able to jump into C#, I need the days to be at minimum of 36 hours at least.


Cheers.

Bob Wahr

  • Guest
Re: VB dot sharp?
« Reply #16 on: June 05, 2006, 10:59:32 AM »
Thanks everyone.
Learn them all Bob, you know you want to.
True, but I figure I'm probably better off starting with one.
C# definately! < snicker >
What's the snicker for Glenn?
I have not being able to jump into C#, I need the days to be at minimum of 36 hours at least.
Luis, At least I'm not the only one who feels that way.

Bob Wahr

  • Guest
Re: VB dot sharp?
« Reply #17 on: June 05, 2006, 06:05:00 PM »
Modified: Removed "if they accept my proposal for ".  Yeah!
Congrats.  Assuming I get get them to foot the bill or at least a part of it, I will be there with bells on.  Or with a hangover, guess it all depends.

Glenn R

  • Guest
Re: VB dot sharp?
« Reply #18 on: June 05, 2006, 08:59:53 PM »
Nothing really Bob, you just have a bit of work to do regardless of your choice.

I once read that coming from classic VB to VB.NET is a very steep learning curve and only a little bit more to go to C#.

It's all personal preference at the end of the day, but most professionals (at least in my experience) prefer the 'C' based language syntax.
Having learnt C++ and really liking the elegance of the language syntax a move to C# was easy.

Kerry was/is a lisper for many years and dived into C# and from what I can tell loves it. If my opinion is worth anything, I would advise you to go to C#.

Cheers,
Glenn.

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: VB dot sharp?
« Reply #19 on: June 06, 2006, 09:49:35 AM »
Modified: Removed "if they accept my proposal for ".  Yeah!
Congrats.  Assuming I get get them to foot the bill or at least a part of it, I will be there with bells on.  Or with a hangover, guess it all depends.
Thanks!  And be sure and let me know if you do get to come.  I'd love to meet some fellow swampers.  I'm guessing that when it gets closer we'll all start posting who's going to make it.
Bobby C. Jones

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: VB dot sharp?
« Reply #20 on: June 13, 2006, 03:02:57 PM »
An interesting conversation, I'm looking at making the same move as Mr. Wahr. I'm fluent in VB, and the COM way of working with CAD, but was missing some key functions (ghosting, etc) that have been exposed through the .NET platform

I've done some tinkering in C++, but I'm far from fluent in it. Any tips on books or online tutorials for learning C# for AutoCAD? Or a useful info source for VS2005 since I'll be upgrading from VB6?

So far I’ve found http://arxdummies.blogspot.com/2005/01/class-1-overview.html

Once I get started in a week or two, you'll hear more from me!

LE

  • Guest
Re: VB dot sharp?
« Reply #21 on: June 13, 2006, 03:26:56 PM »
That class from Fernando is the best you can find!!!

Have fun!

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: VB dot sharp?
« Reply #22 on: June 14, 2006, 09:11:07 AM »
Any tips on books or online tutorials for learning C# for AutoCAD?
I don't know of anything specific to C# for AutoCAD other than this forum, AUGI, and the adesk NG's.  Get familiar with the ARX SDK documentation and samples.  Since the managed API is pretty much a thin wrapper over the ARX API you'll find yourself referencing the ARX docs a lot.

Have fun!
Bobby C. Jones

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: VB dot sharp?
« Reply #23 on: June 14, 2006, 10:38:27 AM »
Bobby, where does one get said books?  Is it in the SDK download?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Bob Wahr

  • Guest
Re: VB dot sharp?
« Reply #24 on: June 14, 2006, 11:43:16 AM »
Hmmm...Sounds like that ACAD2k ObjectARX Developers Guide might finally come in handy.

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: VB dot sharp?
« Reply #25 on: June 14, 2006, 03:34:21 PM »
Bobby, where does one get said books?  Is it in the SDK download?
You can download the SDK from the Autodesk site, http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=773204.

I just did a quick search at the adesk store and you can buy hardcopies of the arx developers guide for $35 U.S.  Just remember that this guide covers ObjectARX and not .NET directly.
Bobby C. Jones

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: VB dot sharp?
« Reply #26 on: June 14, 2006, 03:52:17 PM »
is that the same ARX guide that comes in the doc pack?  I just got my 2007 doc pack today
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: VB dot sharp?
« Reply #27 on: June 14, 2006, 04:06:13 PM »
is that the same ARX guide that comes in the doc pack?  I just got my 2007 doc pack today
It is if it says "ObjectARX Developer's Guide" on the front :-)
Bobby C. Jones

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: VB dot sharp?
« Reply #28 on: June 14, 2006, 04:43:49 PM »
Nope, not the same one.  This says ActiveX and VBA developers guide
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: VB dot sharp?
« Reply #29 on: June 29, 2006, 06:18:30 PM »
I looked at both and opted for C#. That was a year ago and I'm very happy with the decision.

An unexpected bonus was that C# syntax is similar to PHP. So it's got that going for it.

Having said that, I haven't done much with C#-AutoCAD yet. (except take the AU classes and tinker) I have written a couple of apps with C#. One is at.http://www.ebsprinters.com/plottracker.asp

I've found that there is no shortage of C# samples and examples. The dotnet forum at Autodesk seems to favor C#.
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

Bob Wahr

  • Guest
Re: VB dot sharp?
« Reply #30 on: June 30, 2006, 03:49:19 PM »
I looked at your plot tracker program and like what I see.  I'm not sure I'll be able to justify it right now but I'm going to work on it.  Any plans to add to it or make another program for submitting files to the plotter.  I am not a very big fan on Request and would love to have the functionality without the memory leakage.

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: VB dot sharp?
« Reply #31 on: June 30, 2006, 07:56:34 PM »
No plans to connect AutoCAD with PTP.
I do need to re-write my in-house plotting program which is currently written in VB 6.
If plotting in C# works half as good as ActiveX then . . . (what's half of terrible?)

Thanks for the kind words on PTP. My son gets all the credit for the website and all the help plus he was the idea man. I just wrote the code.

=Mark
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

DBARANAS

  • Guest
Re: VB dot sharp?
« Reply #32 on: July 14, 2006, 10:43:52 PM »
I found this link that compares the syntax differences between VB and C# and is helpful to me coming from the dark side  :evil:

http://www.harding.edu/USER/fmccown/WWW/vbnet_csharp_comparison.html

While learning the new .net way to do things familiar in the old COM way, most of the examples that I find all over are in C#. So through exposure... C# syntax is becoming more familiar than it used to be.

My question(s) are:

1) Underneath it all is the same .net?

Or can you do more stuff in C# than you can do in VB on top of it?

Do you have better tools and methods to do things?

2) Is it maybe that coming from the C, C++ world it is more like what you are used seeing to I wonder?

3) I am almost ready to jump in :whistle: to stop having to translate examples into VB..... I am so comfortable reading VB code, but there has to be some reason why when doing things in acad.net C# is so dominant.

Those curly braces are the biggest problem reading C  code. They just don't seem to always be in the expected places. I spend more time trying to figure out the {} notation than reading what is inside them.

Dave






Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: VB dot sharp?
« Reply #33 on: July 15, 2006, 05:33:31 PM »
My question(s) are:

1) Underneath it all is the same .net?
All .NET languages compile down to MSIL.

Or can you do more stuff in C# than you can do in VB on top of it?
If you can do it in C#, you can do it in VB.NET.  (With the exception of unsafe code)

Do you have better tools and methods to do things?
Yes and no.

As far as the VS IDE goes, there are some differences when editing C# and VB code, but nothing that I know of that stands out as a huge benefit for one over the other.  I haven't used other IDE's so I don't know about them.

The one exception to this may be that documentation can be created from XML comments inside C# code.

I just like C# syntax better (I come from a VB6 background).  It's more terse and I think there is much less typing involved.  I've expressed this opinion before and others have disagreed so keep in mind that it is just an opinion. 

2) Is it maybe that coming from the C, C++ world it is more like what you are used seeing to I wonder?
I don't come from that background, but I've heard some that do say that moving into C# is easy for them.

3) I am almost ready to jump in :whistle: to stop having to translate examples into VB..... I am so comfortable reading VB code, but there has to be some reason why when doing things in acad.net C# is so dominant.
I can't really answer the why of your question, but I do find that many of the truly experienced developers using .NET and providing help in the public forums prefer C#.  You don't have to look any further than The Swamp to see that.  I have also found that this is not the case for developers in general.  Most prefer VB...
Bobby C. Jones

Glenn R

  • Guest
Re: VB dot sharp?
« Reply #34 on: July 15, 2006, 11:06:21 PM »
Or can you do more stuff in C# than you can do in VB on top of it?
If you can do it in C#, you can do it in VB.NET.  (With the exception of unsafe code)

Sort of. VB will do some little magic things here and there that are a manual affair for C#, however one BIG exception between the 2 is that I believe VB does NOT have anonymous methods/delegates and doesn't look like getting them in .NET 3.0 either (I could be wrong)...or so I read somewhere. There are probably others.

Cheers,
Glenn.