Help with finding Help on VB.net

Help with finding Help on VB.net

Anonymous
Not applicable
897 Views
5 Replies
Message 1 of 6

Help with finding Help on VB.net

Anonymous
Not applicable

I'm hoping someone can direct me to some general help on VB.net for Acad.

 

I have some fairly long VBA programs that I use for my small company that just don't work that well in 2012 so am trying to migrage to VB.net.  Thus far my searching has failed to find the help files or documents that are usefull.  (I'm sure they must exist)

 

I've been using VBA for 10+ years but am new to vb.net.  I have figured out how to create basic programs using VS 2010 and get them running but it seems every thing I want to do requires an hour or 2 google search to figure out.  An example of simple things I want to know how to do...

 

simple things like have the user select and acad entity and read it's properties. Ther must be somewhere that will show me the vb.net equivilent of VBA's GetEntity method and more importantly how to use it.  (I did find on the Autdesk site a list of vb.net equivalents for VBA commands but no details on them)

 

or for example extracting the xdata from an entity,  

 

Thanks in advance for any help.

 

David

0 Likes
898 Views
5 Replies
Replies (5)
Message 2 of 6

SENL1362
Advisor
Advisor

Hello David,

I know exactly what you mean, because i experienced that too a while ago. Mu background and experience is exactly the same.I read the documentation and tried some samples of others but still field some knowledge is missing.

So i started all over again, and because most of the information beyound Autodesk are written in C# i started to understand that language.

 

This site can help you with seperate questions like the GetEntity and others but if in the end you want to be able to solve you're own questions you have to start with the beginning. This is what Tony Tanzillo tries to say between the lines, and he is right.  If you have a good look at the solutions from Tony and the other guru's you can see that they have good knowledge of C++ and ARX as well and therefore they understand the arxXXX.chm and extra information Visual Studio provide.

 

Depending on the language there is a lot of information which can help you get started.

Very helpful for me was starting with Notepad and the commandline compiler, because you will understand the program  line for line.

Then if you have a good understanding of the VB or C# language you can explore the use of .NET in AutoCAD,

for AutoCAD + VB.NET this book may be helpfull "VBNet For AutoCAD2010 by Jerry Winters"

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627

 

and for AutoCAD + C# the sites

This site

http://through-the-interface.typepad.com by Kean Walmsley

http://www.theswamp.org

http://www.acadnetwork.com

may help you.

 

Good luck,

Frits



 

 

 

0 Likes
Message 3 of 6

andrewpuller3811
Advisor
Advisor

If you are on subscription, check out the Autodesk University classes

 

CP114-3L Going From VBA to VB.NET in 90 Minutes located here http://au.autodesk.com/?nd=class&session_id=7029

 

CP327-6L Hands On Migrating VBA Projects to VB.NET located here http://au.autodesk.com/?nd=class&session_id=5112

 

Also, check out the this post by Kean Walmsley, which has a link to a video and sample data on migrating VBA to vb.net

 

http://tinyurl.com/cu6bpf

 



If a post provides a fix for your issue, click on "Accept as Solution" to help other users find solutions to problems they might have that are similar to yours.

Andrew Puller
Maitland, NSW, Australia
Windows 11
Intel core i7 11800 @ 2.30 GHz with 32GB Ram
Civil 3d 2023
0 Likes
Message 4 of 6

michael_robertson
Collaborator
Collaborator

Start out using the Autodesk Developer Center at: http://usa.autodesk.com/adsk/servlet/index?id=1911627&siteID=123112

Has traing webcast, documentation, and sample code.

 

Jerry Winters has a pretty goob book "VB.NET for AutoCAD 2010"

 

An 8 Session series was just posted on DevTV using all VB .NET (the session one recording is missing but that info was covered in the above webcast. http://www.adskconsulting.com/adn/cs/api_course_webcast_archive.php

 

 

 

 

 

 

 

 

Mike Robertson
FL. Dept. of Transportation
CADD Applications Developer
0 Likes
Message 5 of 6

Anonymous
Not applicable

Hi David,

 

I am in the same situation, starting to recreate a decade of VBA solutions in VB.NET, painfully, an angstrom at a time, doing the most cherished broken VBAs first that might be suitable for starting out. I am using VS Express 2010. For the same reason like you say, I can read C# but not write it as well as VB. I would assume you use online C# to VB code converters. Progress is slow due to the long delay required to restart AutoCAD.

 

One thing that does help me a lot is to create lots of local variables and then examine what the Locals window reports on those variables while stepping through tests in the Visual Studio debugger, much like canvassing the hardware store. Doing that provides context information that I do not find very easily in other sources and reveals whether or not it the needed property types exist.

 

A well organized, good source is theswamp.org if you have not already come across it. Most blogs like Through the Interface may be accurate but their cookbook style, i.e. lacking AutoCAD specific background information, show how something is done but does not explain why something is done. So like some cookbooks you have to figure out on your own why the recipe must proceed in a specific way. DotNetPearls does provide background information but not for AutoCAD. 

 

AKS

0 Likes
Message 6 of 6

Anonymous
Not applicable

thanks for the advice.  I'm starting to muddle thought it.

0 Likes