TheSwamp

Code Red => .NET => Topic started by: fxcastil on February 09, 2006, 08:35:30 PM

Title: VB.net API for Autocad
Post by: fxcastil on February 09, 2006, 08:35:30 PM
Where do I get all the vb.net properties/methods for AutoCAD (AutoCAD VB.net API)

Is there a good book for getting started in VB.net for AutoCAD

Fred
Title: Re: VB.net API for Autocad
Post by: jnieman on July 21, 2008, 06:21:19 PM
*bump*

Reviving this corpse thread because I was wondering the same thing.
Title: Re: VB.net API for Autocad
Post by: Jeff_M on July 21, 2008, 06:33:11 PM
The .NET Properties/Methods are found in the acad_mgd.chm help file. I do not recall if this is inlcuded in the base install or if it is a part of the ObjectARX docs. If the latter, get the ObjectARX2008 (or 2009) Development Kit from Adesk's website (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550)

The helpfiles and the .NET Labs, also available at Adesk (http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627), are good starting points.
Title: Re: VB.net API for Autocad
Post by: Atook on July 21, 2008, 06:34:46 PM
In VB6/VBA there was an object browser built in to the IDE. I believe the key for it was F2 once you had the IDE open.
Title: Re: VB.net API for Autocad
Post by: jnieman on July 21, 2008, 06:43:16 PM
Thank you so much.

Additionally...

what do you use for project creation/management for .NET?

I installed the 90 day trial of Visual Studio 2008 and find it ... well it's not what I'm used to.  The most robust application for program writing I've used is the VBA Manager.
Title: Re: VB.net API for Autocad
Post by: Jeff_M on July 21, 2008, 07:06:25 PM
The Express Editions of the Visual Studio IDE's is all you need. They are free and do most everything you will need.  http://www.microsoft.com/express/download/

And no, they are definitely different than VBA, but so are the things you can do with them. ("Them" being VB.NET, C#, C++)
Title: Re: VB.net API for Autocad
Post by: jnieman on July 21, 2008, 07:29:13 PM
mk, cool then.  I'll download the express edition (sans 90 day limit) and give that a whirl next time I get back to going through VB.NET tutorials.

I'm liking it so far.  I guess something has PARTIALLY clicked, because I'm not having much trouble following syntax and knowing WHAT does WHAT and WHY.. the MS help files and tuts have been ok so far.

I would still like to have a GOOD solid physical book in front of me that can step me through getting started in --Autocad-- from the bottom up, but I'm starting with the basics for now (as I would be doing anyways)
Title: Re: VB.net API for Autocad
Post by: vegbruiser on July 22, 2008, 05:54:47 AM
I recently purchased a (digital only) copy of Jerry Winters "VB.NET Programming for AutoCAD Customization" and have found that quite useful - although it is aimed at AutoCAD 2007 and beyond, so some of the functions he describes don't work as expected (or at all) if you're using AutoCAD versions older than 2007 (As I am).

On the whole, I've found it quite useful, although, as previous posts have said, reading the documentation from Autodesk will be a great help too.

:)
Title: Re: VB.net API for Autocad
Post by: jnieman on July 22, 2008, 08:56:21 AM
I found a lot of opinions on that book.

The only negatives were about shipping... which is basically hit or miss no matter what you do.  I've heard many say they got it in a couple weeks which is fast enough for me for snail mail.

There was only one negative dissenter about the author and there was no follow up to the quip and no explanation... so I'm not putting any stake in it.

It's a reasonable price too... after seeing the list of chapters, I'm only a bit disappointed that he doesn't get into 3d object creation, but really... after all the book seems to cover, I think I can make the transition just fine on my own once I get through his book.
Title: Re: VB.net API for Autocad
Post by: David Hall on July 23, 2008, 03:18:59 PM
I own the book, and was disappointed he didn't cover more topics.  The chapter on blocks was fantastic, as long as the block was already defined in your dwg file.  It took me forever to find a way to use the browse out and get a block method, and even then, Im not sure I did it right.
Title: Re: VB.net API for Autocad
Post by: David Hall on July 23, 2008, 03:20:37 PM
But I should also say, I'm using C#, and only use the book for an example of what I'm looking for when I get stuck.
Title: Re: VB.net API for Autocad
Post by: Dimas1 on July 24, 2008, 01:54:15 AM
I recently purchased a (digital only) copy of Jerry Winters "VB.NET Programming for AutoCAD Customization"...
could you pls give a link to this book download or a link to purchase it?
Title: Re: VB.net API for Autocad
Post by: fixo on July 24, 2008, 02:26:16 AM
You can just buy this book, say on amazon.com
Here is a link to Jerry's web page:
http://www.vbcad.com/vbcaddownloads.asp

~'J'~
Title: Re: VB.net API for Autocad
Post by: Dimas1 on July 24, 2008, 10:48:29 PM
checked that link(
I don't have visa card( Is there still a way to get this book if I can pay via webmoney or cash?
Title: Re: VB.net API for Autocad
Post by: David Hall on July 25, 2008, 12:41:38 AM
best bet would be to pay someone who has a visa card to order it for you.  Amazon might take a check, but it depends on where you are also
Title: Re: VB.net API for Autocad
Post by: fixo on July 25, 2008, 04:33:53 AM
checked that link(
I don't have visa card( Is there still a way to get this book if I can pay via webmoney or cash?
Sorry, I don't know that :)

~'J'~
Title: Re: VB.net API for Autocad
Post by: Nathan Taylor on July 27, 2008, 07:11:42 PM
checked that link(
I don't have visa card( Is there still a way to get this book if I can pay via webmoney or cash?

You should be able to order it through a bookstore if it has an ISBN number.
Title: Re: VB.net API for Autocad
Post by: Dimas1 on July 29, 2008, 10:37:18 PM
You should be able to order it through a bookstore if it has an ISBN number.
thats a digital book. Should it also have an ISBN number?
Title: Re: VB.net API for Autocad
Post by: vegbruiser on July 30, 2008, 04:01:11 AM
the .pdf has the ISBN at the end of it.

By chance I happened to have it open: -

(See attached)
Title: Re: VB.net API for Autocad
Post by: Dimas1 on July 30, 2008, 07:31:10 PM
is that the same very book? the one mentioned above costs 20 bucks
Title: Re: VB.net API for Autocad
Post by: jnieman on July 30, 2008, 07:53:20 PM
is that the same very book? the one mentioned above costs 20 bucks

The E-Book costs $20... I'm thinking about buying it right now, actually...
Title: Re: VB.net API for Autocad
Post by: MickD on July 30, 2008, 08:41:13 PM
heh heh, sound security features indeed.
Quote
If you 'share' this E-book with others, violating Copyright law, we will track you down and force you to listen to Elevator Music versions of music from the 1980's.[\quote]
Title: Re: VB.net API for Autocad
Post by: Kerry on July 30, 2008, 10:24:54 PM
Perhaps it's time to resurect
C# Programming for AutoCAD
{a hackers guide to taming the beast} ® 

http://www.theswamp.org/index.php?topic=14928.0

[ponder]
... wonder if we could get advanced sales :)
[/ponder]
Title: Re: VB.net API for Autocad
Post by: vegbruiser on July 31, 2008, 04:20:38 AM
is that the same very book? the one mentioned above costs 20 bucks
It is indeed the same book. I paid (due to favourable exchange rates) £10 Sterling for my copy. :)
Title: Re: VB.net API for Autocad
Post by: jnieman on July 31, 2008, 08:35:39 AM
Perhaps it's time to resurect
C# Programming for AutoCAD
{a hackers guide to taming the beast} ® 

http://www.theswamp.org/index.php?topic=14928.0

[ponder]
... wonder if we could get advanced sales :)
[/ponder]

I'm sure I'd add that book to my library too, without a doubt.  If for no other reason than to help support swampers that have helped me before.  However the material would be extremely relevant and of high quality I would be confident in saying.

However, what's with the "Ew. VB"  "Exactly" comments?

I began with C# using the Visual Studio Express tutorials/guides and MSDN libraries for reference... it got shelved, then I went on to develop a little more vba in my time to just "get it done" since I had a better platform to leap from at that time... I had come across some VB.NET and found it, for some weird reason... just easier to understand.  My mind clicked easier pouring over VB than it did for C#... however that may be because there was some definite growth in my brain between trying C# and VB...

But why is VB Eww-tastic?
Title: Re: VB.net API for Autocad
Post by: It's Alive! on July 31, 2008, 09:20:45 AM
But why is VB Eww-tastic?

One thought is that since the .NET API for AutoCAD wrap’s C++ libraries and at some point one might need to reference the underlying  C++/ARX documents, a person who uses C# might have an advantage reading the C++ samples/docs over a VB user.  When I have questions while programming in C#, one of the places I look is the ARX groups. 

But if dig VB, that’s fine, we C#’ers can still make fun of you  :lmao:
Just a little rivalry thing, don’t take it personally  :-)
Title: Re: VB.net API for Autocad
Post by: jnieman on July 31, 2008, 09:22:51 AM
But why is VB Eww-tastic?

One thought is that since the .NET API for AutoCAD wrap’s C++ libraries and at some point one might need to reference the underlying  C++/ARX documents, a person who uses C# might have an advantage reading the C++ samples/docs over a VB user.  When I have questions while programming in C#, one of the places I look is the ARX groups. 

AHhh ok, wasn't clear on that.  I have been referencing the ARX books per the suggestions on the Autodesk development guides but did not put 2 and 2 together like that.

But why is VB Eww-tastic?
But if dig VB, that’s fine, we C#’ers can still make fun of you  :lmao:
Just a little rivalry thing, don’t take it personally  :-)

 :-D  All in good fun.  Maybe later you can tell me which pocket protector works the best ;)
Title: Re: VB.net API for Autocad
Post by: It's Alive! on July 31, 2008, 09:32:53 AM
:-D  All in good fun.  Maybe later you can tell me which pocket protector works the best ;)

Umm, that would be this one, the protector 5000
Title: Re: VB.net API for Autocad
Post by: Nathan Taylor on July 31, 2008, 07:11:10 PM
Perhaps it's time to resurect
C# Programming for AutoCAD
{a hackers guide to taming the beast} ® 

http://www.theswamp.org/index.php?topic=14928.0

[ponder]
... wonder if we could get advanced sales :)
[/ponder]

I'm sure I'd add that book to my library too, without a doubt.  If for no other reason than to help support swampers that have helped me before.  However the material would be extremely relevant and of high quality I would be confident in saying.

However, what's with the "Ew. VB"  "Exactly" comments?

I began with C# using the Visual Studio Express tutorials/guides and MSDN libraries for reference... it got shelved, then I went on to develop a little more vba in my time to just "get it done" since I had a better platform to leap from at that time... I had come across some VB.NET and found it, for some weird reason... just easier to understand.  My mind clicked easier pouring over VB than it did for C#... however that may be because there was some definite growth in my brain between trying C# and VB...

But why is VB Eww-tastic?

This group is dominated by elitist's.
Title: Re: VB.net API for Autocad
Post by: David Hall on July 31, 2008, 08:05:04 PM
Slow down, no name calling.  We have had enough of that before.  There are some vary valid pros and cons to the VB vs. C# debate, none of which I will be making, because I have had a very long day, and I dont feel like searching for hours to point them out.  Most of what I could put together would be second hand if not third hand knowledge anyway.  But I do know this- there are posts that compare VB vs C# on a coding level, WITHOUT bashing each other, and you can do things in VB that you cant do in C#.  That being said, you can do things "cleaner" (my opinion and that of SOME of the other members of the swamp) in C#.  Bottom line is it all compiles to the same dll file. (Before anybody jumps down my throat, yes, I know there are differences).  If you are more comfortable learning VB, then learn away.  I can relate in that when I attempted to start learning C#, I kept thinking in VBA.  Huge mistake!!  But I kept trying, and still do, look to what I know in VBA and try to figure out how to make C# work.  I have to keep being reminded from my peers here to stop thinking in VBA, because they are just way to different.

If you need to find official documentation on one vs the other, all I can offer is this-  somewhere on the swamp, someone has posted a link to an official Microsoft page that talks about WHY there is so much C# examples available, not just for Autocad, but in general.  It has to do with supply and demand.  Most of the world has unofficially embraced C# over VB.  Microsoft is trying to produce material as fast as it can, and C# is in demand.  Someone also posted about going to the local bookstore and finding a ton of books on C# and very few on VB.  Same problem, writers are writnig books that sell, and the VB books are not in high demand.  I applaud Jerry W for writing a book on VB.Net and Autocad, I even own the book.  I still prefer to write in C#.  I use it for reference for when Im really stuck, and I dont feel like bothering everybody here.

Now you can call me an elitist, but if you look at the drivel I post and need help with, you will see Im not.  Im just trying to learn this just like everyone else.
Title: Re: VB.net API for Autocad
Post by: Nathan Taylor on July 31, 2008, 08:16:12 PM
Slow down, no name calling.  We have had enough of that before.  There are some vary valid pros and cons to the VB vs. C# debate, none of which I will be making, because I have had a very long day, and I dont feel like searching for hours to point them out.  Most of what I could put together would be second hand if not third hand knowledge anyway.  But I do know this- there are posts that compare VB vs C# on a coding level, WITHOUT bashing each other, and you can do things in VB that you cant do in C#.  That being said, you can do things "cleaner" (my opinion and that of SOME of the other members of the swamp) in C#.  Bottom line is it all compiles to the same dll file. (Before anybody jumps down my throat, yes, I know there are differences).  If you are more comfortable learning VB, then learn away.  I can relate in that when I attempted to start learning C#, I kept thinking in VBA.  Huge mistake!!  But I kept trying, and still do, look to what I know in VBA and try to figure out how to make C# work.  I have to keep being reminded from my peers here to stop thinking in VBA, because they are just way to different.

If you need to find official documentation on one vs the other, all I can offer is this-  somewhere on the swamp, someone has posted a link to an official Microsoft page that talks about WHY there is so much C# examples available, not just for Autocad, but in general.  It has to do with supply and demand.  Most of the world has unofficially embraced C# over VB.  Microsoft is trying to produce material as fast as it can, and C# is in demand.  Someone also posted about going to the local bookstore and finding a ton of books on C# and very few on VB.  Same problem, writers are writnig books that sell, and the VB books are not in high demand.  I applaud Jerry W for writing a book on VB.Net and Autocad, I even own the book.  I still prefer to write in C#.  I use it for reference for when Im really stuck, and I dont feel like bothering everybody here.

Now you can call me an elitist, but if you look at the drivel I post and need help with, you will see Im not.  Im just trying to learn this just like everyone else.

I did not call you personally elitist. So why the big reaction? It is not a matter of which is the better language it is the way people treat those who don't tow there line.
Title: Re: VB.net API for Autocad
Post by: jnieman on July 31, 2008, 08:28:05 PM
The problem is that you chose to instead blanket the entire active community as "elitists"

CmdrDuh =is= a dominant figure in this community, and is a dominant contributor and active colleague amongst those in the programming fora... but he still never mentioned that he took your remarks as being directed at him.

He merely spoke on the topic, and did not take anything personal.

More than I would've done :P
Title: Re: VB.net API for Autocad
Post by: sinc on July 31, 2008, 08:33:40 PM
I did not call you personally elitist. So why the big reaction? It is not a matter of which is the better language it is the way people treat those who don't tow there line.

What do you mean?  I don't know a single C# programmer who has anything against VB programmers.  It was their own choice to use that language, nobody forced them, and they are perfectly welcome to suffer as long as they wish.   :angel:


(but I kid...  In reality, I can write basically the same code in either language, and can read samples in either language equally-well.  I just prefer C# syntax, and I like the Visual-C# IDE more than I like the Visual-Basic IDE.  But to tell you the truth, I hardly notice the difference between the two.)
Title: Re: VB.net API for Autocad
Post by: Nathan Taylor on July 31, 2008, 08:51:19 PM
Whenever Kerry see's VB code he complains how much he hates VB. He may not be personally attacking the poster but it does get tiring. Glenn is also another big culprit and there are others. They may not mean any thing by it but they do come across as elitist.
Title: Re: VB.net API for Autocad
Post by: Kerry on July 31, 2008, 08:56:02 PM
I have no comment on Post # 28 and #33 except to say  "I have no constuctive comment to make"
and that I have no desire to be drawn in the direction I can see this thread heading.
Title: Re: VB.net API for Autocad
Post by: jnieman on July 31, 2008, 10:53:19 PM
I think you read things the wrong way Nathan.

For instance, I'm a .NET hopeful and total newbie at it.

I see a C# and VB conflict (actually hadn't seen anything out of the norm, tbh) as a way to learn.

There are a number of people I highly respect the knowledge of, who come across as firmly pro-C# and none-too-favorable of VB, given the choice...

am I going to whine about their opinion on VB?  No... I'm going to look at WHY they think C# is superior, and think "Gee, maybe C# will be better for me too" and make a rational educated decision.

One big factor that I've seen already is the truth behind the number of resources for C# over VB...  I'm considering giving C# another go, really...
Title: Re: VB.net API for Autocad
Post by: Nathan Taylor on August 01, 2008, 01:44:15 AM
Josh I made a throw away comment. A couple of people have over reacted. So I pointed out why I feel that way and an appropriate person has responded gracefully. I knew that those people I were originally aiming at with out naming would take it gracefully. Unfortunately others did not do the same.
Title: Re: VB.net API for Autocad
Post by: Kerry on August 01, 2008, 02:07:11 AM
<snip> I knew that those people I were originally aiming at with out naming would take it gracefully. Unfortunately others did not do the same.

Nathan, just so you know, I did not take it gracefully. The guys here wanted to know what I was swearing about. I just chose to not pollute this forum with my wrath.
Title: Re: VB.net API for Autocad
Post by: Nathan Taylor on August 01, 2008, 02:15:04 AM
<snip> I knew that those people I were originally aiming at with out naming would take it gracefully. Unfortunately others did not do the same.

Nathan, just so you know, I did not take it gracefully. The guys here wanted to know what I was swearing about. I just chose to not pollute this forum with my wrath.


Well maybe now you will stop to think how you make other people feel with your constant derisive comments.
Title: Re: VB.net API for Autocad
Post by: MickD on August 01, 2008, 03:54:12 AM
Nathan, to be fair, I don't ever recall Kerry saying that people who use VB suck, just that he thinks VB sucks and that's his opinion, which he is entitled too, just take it for what it is ... and move on.

Cheers,
Mick.

<edit> Kerry, I know you never said it 'sucked', just trying to make a point.</edit>

Title: Re: VB.net API for Autocad
Post by: Alan Cullen on August 01, 2008, 05:11:13 AM
Here, here...... :lol:

Gotta stick up for the aussies, even though I have no idea what this is all about.  :lmao: :lmao: :lmao:
Title: Re: VB.net API for Autocad
Post by: Strucmad on August 01, 2008, 07:30:07 AM
Hey VB doesn't suck, XXXX sucks :evil:
Title: Re: VB.net API for Autocad
Post by: jnieman on August 01, 2008, 07:40:45 AM
Hey VB doesn't suck, XXXX sucks :evil:

You're totally wrong, Brett Favre is just doing what's best for the fans.










*runs*
Title: Re: VB.net API for Autocad
Post by: Kerry on August 01, 2008, 07:51:10 AM
Hey VB doesn't suck, XXXX sucks :evil:

Just for Clara Fication

.. and one for Paul !
Title: Re: VB.net API for Autocad
Post by: jnieman on August 01, 2008, 07:52:59 AM
ha... ahhh... ok... I get it... wallaby owners only.

I'll be outside :P
Title: Re: VB.net API for Autocad
Post by: It's Alive! on August 01, 2008, 08:01:27 AM
 :lmao:
Title: Re: VB.net API for Autocad
Post by: Glenn R on August 01, 2008, 08:50:39 AM
Whenever Kerry see's VB code he complains how much he hates VB. He may not be personally attacking the poster but it does get tiring. Glenn is also another big culprit and there are others. They may not mean any thing by it but they do come across as elitist.

I see I'm coming across as 'Elitist' - excellent! My evil plan is working :)
Carry on.
Title: Re: VB.net API for Autocad
Post by: MickD on August 01, 2008, 06:49:51 PM
you know why they call it XXXX don't you :evil:
Title: Re: VB.net API for Autocad
Post by: Kerry on August 01, 2008, 07:10:17 PM
you know why they call it XXXX don't you :evil:

Something to do with it tasting like poison ... and Queenslanders not being able to read more gooder  :|
Title: Re: VB.net API for Autocad
Post by: Kerry on August 01, 2008, 07:11:42 PM
... and just to clear something up ... I don't mind VB at all ; It's a pretty good beer.  :-)
Title: Re: VB.net API for Autocad
Post by: Alan Cullen on August 01, 2008, 07:16:44 PM
Hey VB doesn't suck, XXXX sucks :evil:

Hey, you are already behind the 8 ball with us Queenslanders, mate.

At this point in time you are in big trouble you little cockroach.  :lmao: :lmao: :lmao:
Title: Re: VB.net API for Autocad
Post by: Alan Cullen on August 01, 2008, 07:23:50 PM
you know why they call it XXXX don't you :evil:
yup, yup, yup

just so you mexicans know it's beer....

stay away, stay away  :lmao: :lmao: :lmao: