.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C# or C++ to move to .Net for acad

17 REPLIES 17
Reply
Message 1 of 18
Anonymous
676 Views, 17 Replies

C# or C++ to move to .Net for acad

I tried searching google groups first for this but cant get any results on
this group for some strange reason?

I'm looking for opinions of best "language" choice if one is forced to move
to .net to continue forward with acad programming.
(in house customization)

I know there have been many discussions of this but I'm not finding them.


thanks
mark
17 REPLIES 17
Message 2 of 18
Anonymous
in reply to: Anonymous

I suppose this would depend on your background, what languages did you use in the past?
Message 3 of 18
Anonymous
in reply to: Anonymous

Given your participation in the VBA group I would recommend the path I took from VBA to VB.NET where you take advantage of already knowing the syntax. Grab a good book on VB.NET or take a short course (a few days) (I did both). Then have a look at this http://through-the-interface.typepad.com/through_the_interface/2007/11/devtv-introduct.html.
Message 4 of 18
Anonymous
in reply to: Anonymous

wrote in message news:5835023@discussion.autodesk.com...
I suppose this would depend on your background, what languages did you use
in the past?

I went the typical cad monkey path 🙂 lisp -> vba -> vb6
have read several books on c++ a few years back and got kinda
overwhelmed...mostly from lack of time to apply to it.

I've been watching the gradual movement toward the .net direction...and from
the vb6 groups it's not very well liked.
Sadly it seems acad is bent on that direction so I guess there's no
alternative but to follow..

I'm still a bit unclear on the various ways of programming for acad in the
.net world ...
c++ is required to create custom objects?
objectarx is a com interface?
c++ is used to interface with objectarx?
vb.net or c#.net are "managed" and somehow can interface with acad without
arx?

so it's now arx or .net as two completely separate methodologies?

there is a lot of grief in the vb community over ms destroying vb6 with the
.net debacle
and watching .net from a distance we see ms destroy the first couple
versions of the framework already
so there's very little confidence that all the time spent learning the
current flavor won't be thrown away next year or in 5 years etc.

c++ is likely to be more stable over a longer time horizon...
not that any of this is that important for the little utilities that I do in
house but still it's a significant investment to learn the c families or the
.net framework so i'd like to not throw it away on a "disposable" version...

mark
Message 5 of 18
Anonymous
in reply to: Anonymous

wrote in message news:5835061@discussion.autodesk.com...
Given your participation in the VBA group I would recommend the path I took
from VBA to VB.NET where you take advantage of already knowing the syntax.
Grab a good book on VB.NET or take a short course (a few days) (I did both).
Then have a look at this
http://through-the-interface.typepad.com/through_the_interface/2007/11/devtv-introduct.html.

Hi Nathan,
from what I had heard there were very few similarities except in the name
I've been kind of prejudiced from what I read on the vb6 groups where
theres' a general derision of the .net "fiasco" so I need to get a less
biased (or alternately biased?) view from those on this side for a while 🙂

with the first couple versions of the framework becoming obsolete within a
year of their own releases it is kinda scary to invest a lot of learning
time into such an unstable product...
seeing into the future is always a tough one 🙂

seems like c++ is more stable from the point of view that it's not
proprietary to ms and is generally the "big daddy" of lanuages out there in
the larger programming world...not that I'll ever go *there*

just trying to get some food for thought...
Thanks
Mark
Message 6 of 18
Anonymous
in reply to: Anonymous

wrote in message news:5835061@discussion.autodesk.com...
Given your participation in the VBA group I would recommend the path I took
from VBA to VB.NET where you take advantage of already knowing the syntax.
Grab a good book on VB.NET or take a short course (a few days) (I did both).
Then have a look at this
http://through-the-interface.typepad.com/through_the_interface/2007/11/devtv-introduct.html.

Oh no! 😉 now another option...F# ???
does that imply that F# is now the way to automate acad versus C# C++, arx
etc???
Message 7 of 18
Anonymous
in reply to: Anonymous

F# is not something you have to worry about for .net
Message 8 of 18
Anonymous
in reply to: Anonymous

wrote in message news:5835651@discussion.autodesk.com...
F# is not something you have to worry about for .net

That's what the link took me to so I wasn't sure...
What do I need to use .net?

What's the diff btwn .net and arx for example? or sites or links, like I
said I'm sure this has been discussed ad nauseum but I havent' found any
good introductory overviews of the "brave new world"
:-)
Thanks
Mark
Message 9 of 18
Anonymous
in reply to: Anonymous

Either visual basic or C#

There is a book available for VB.net (some people experiencing delivery problems but I got it easily enough)

http://www.amazon.com/VB-NET-Programming-AutoCAD-Customization-Level/dp/1892131102

There is alot of .net code in C# on the blog linked to earlier.
F# might be something for the future.
Message 10 of 18
Anonymous
in reply to: Anonymous

>>from what I had heard there were very few similarities except in the name
I've been kind of prejudiced from what I read on the vb6 groups where
theres' a general derision of the .net "fiasco" so I need to get a less
biased (or alternately biased?) view from those on this side for a while 🙂


All I can say is I found it an easy transition. The syntax of the language is the same so you don't have to waste time on learning/getting used to a different syntax.

This is an excellent free book to get the facts about the differences.
http://msdn2.microsoft.com/en-us/vbrun/ms788236.aspx


>>with the first couple versions of the framework becoming obsolete within a
year of their own releases it is kinda scary to invest a lot of learning
time into such an unstable product...
seeing into the future is always a tough one 🙂


The frameworks are not obsolete. When a new framework is released it is just the previous framework with new features. Theoretically if v50 of the framework is released programs written for v1 should work.
Message 11 of 18
Anonymous
in reply to: Anonymous

wrote in message news:5836028@discussion.autodesk.com...

The frameworks are not obsolete. When a new framework is released it is just
the previous framework with new features. Theoretically if v50 of the
framework is released programs written for v1 should work.

So what was it that broke, the ide? I remember seeing something about 1.1
and 1.2 being incompatible with 2.0....I guess since then up to 2008 it's
been ok?

obviously i'm hazy on the details
:-)
mark
Message 12 of 18
Anonymous
in reply to: Anonymous

Mark - To target the .net api download c# and vb express versions and start
coding to see which syntax you like best. Most good samples floating around
are in c# which has a much cleaner syntax. The ObjectARX sdk has plenty of
info in the docs to answer most of your questions. Also grab the labs from
ths group which will teach you the basics.

To target the native arx api, you'll need to use c++. You can use the
express version but will be much happier with a full version of VS. The
native api offers the most power but gives you the ability to shoot yourself
in the foot and if for some reason you don't it will just do it for you...
`~).

Few of your vba skills will transfer to vb.net so I'd go with c# and forget
your vba knowledge while in .net!

gl - Paul


"MP" wrote in message
news:5834720@discussion.autodesk.com...
I tried searching google groups first for this but cant get any results on
this group for some strange reason?

I'm looking for opinions of best "language" choice if one is forced to move
to .net to continue forward with acad programming.
(in house customization)

I know there have been many discussions of this but I'm not finding them.


thanks
mark
Message 13 of 18
rdswords
in reply to: Anonymous

If you've got a VB background, then just go with VB.net. It will be a fairly easy transition, and you can just nab the free Visual Basic 2008 Express Edition from the Microsoft site.

I prefer C#, but that's because I have a C++/Java background. Either one will work just fine for you.
Message 14 of 18
Anonymous
in reply to: Anonymous

This is what I did:

I started with Autolisp / Visual Lisp / DCL / ObjectDCL / VBa very little / ... ...

Then, move to C++ / MFC / ObjectARX / C#...

I am not in any way an expert at all, but I can play with all those programming languages now.

Do they help me? well, they keep my 3 brain cells left - alive! that's a win-win situation....

PS> remember that it will take you some time, to get into this, so make sure to spend at least 4 or 5 years of your time (minimum - and if you can take a programming class in some school - better!), before you fell comfortable and start seeing results and that is just a start.

Good luck!
Message 15 of 18
Anonymous
in reply to: Anonymous

>>Few of your vba skills will transfer to vb.net so I'd go with c# and forget your vba knowledge while in .net!

Why waste time learning a new language syntax?
Message 16 of 18
Anonymous
in reply to: Anonymous

>> Why waste time learning a new language syntax?

Dim i as Integer
Dim j as Integer
j = 1
For j = 0 to 10
'...
Next j

vs

int i;
for (int j = 1; j <= 10; j++)
//...

I just got a job where I have to do some Java - Got up and running on it
over the weekend which wouldn't have been possible if I didn't use the c
syntax.

The syntax is close to c++ and learning a little native arx along the way
does not hurt any while learning .net. Many samples in the arx group to
learn from - all of which are in c.

Just got Intel Threading Building Blocks to study - bear without c..)

It's good for the brain to learn new things.

I like green and brown better than power blue..`~)

Fricken Patriots!@+*(

Like I said - download all the express versions and have at it! Pick the
version one likes.


wrote in message news:5837738@discussion.autodesk.com...
>>Few of your vba skills will transfer to vb.net so I'd go with c# and
>>forget your vba knowledge while in .net!

Why waste time learning a new language syntax?
Message 17 of 18
Anonymous
in reply to: Anonymous

I can't even remember the syntax... ~)

Dim i as Integer
Dim j as Integer
For j = 1 to 10
'...
Next j

vs

int i;
for (int j = 1; j <= 10; j++)
//...

"Paul Richardson" wrote in message
news:5838837@discussion.autodesk.com...
>> Why waste time learning a new language syntax?

Dim i as Integer
Dim j as Integer
j = 1
For j = 0 to 10
'...
Next j

vs

int i;
for (int j = 1; j <= 10; j++)
//...

I just got a job where I have to do some Java - Got up and running on it
over the weekend which wouldn't have been possible if I didn't use the c
syntax.

The syntax is close to c++ and learning a little native arx along the way
does not hurt any while learning .net. Many samples in the arx group to
learn from - all of which are in c.

Just got Intel Threading Building Blocks to study - bear without c..)

It's good for the brain to learn new things.

I like green and brown better than power blue..`~)

Fricken Patriots!@+*(

Like I said - download all the express versions and have at it! Pick the
version one likes.


wrote in message news:5837738@discussion.autodesk.com...
>>Few of your vba skills will transfer to vb.net so I'd go with c# and
>>forget your vba knowledge while in .net!

Why waste time learning a new language syntax?
Message 18 of 18
jbooth
in reply to: Anonymous

There is no difference between C# and VB.NET aside from the syntax. In fact, you can run VB code through the Microsoft.VisualBasic namespace in C#.

Really it only depends on your preffered language, since both of them use the same managed libraries, and get compiled into the same IL (intermediate language) for .NET.

VB has some easy-to-use features (like the My.Computer or My.Application namespaces) that are handy, but C# has access to all of the same things, if you know where to look. For example, most properties/methods in the My.Application namespace can be found under the System.Reflection namespace under the Assembly class.

Anyway, if you are developing in .NET, do not be afraid of choosing wrong language for the job.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost