invoke data extraction through vb.net

invoke data extraction through vb.net

Anonymous
Not applicable
2,250 Views
5 Replies
Message 1 of 6

invoke data extraction through vb.net

Anonymous
Not applicable
All-
I am attempting to build an in house app to aid in general efficiencies etc. and would like to be able to invoke the data extraction wizard (and pass a few parameters to it) via a standalone VB.Net app. is this possible? Any help on some starter code would be really appreciated!
0 Likes
2,251 Views
5 Replies
Replies (5)
Message 2 of 6

chiefbraincloud
Collaborator
Collaborator

1.) 'Standalone VB .NET app' While I believe it is possible to create a VB EXE which would handle everything, It will be much more convenient, and most likely more stable, to use the .dll structure and let autocad do the heavy lifting.

There is a Class which provides access to the data extraction engine.

There was a long winded explanation of finding some schtuff and not finding some schtuff, but then I found the schtuff.
this post by Kean Walmsley should help. except it's in C#.

http://through-the-interface.typepad.com/through_the_interfa ce/2008/04/extracting-data.html

Incidentally, if I'm looking for examples to follow, I go there first.

I also figured out that you have to add an additional, not normally used reference to acDx.dll. It says it in the post, but not until you get all the way down into the comments.

If you are pretty familiar with VB.NET, but unfamiliar with C#, you should be able to do as I have done (alot) and muddle through translating that c# example into VB code. All of the Classes used and parameters are the same, just different syntax.

I have no code which utilizes the DataExtraction Class, but if you need some help getting going, I could take a closer look at the example and translate it to VB for you. Plus provide a few tips and examples on how to get your project set up in the first place.

I was about to point you to the tutorial in the ObjectARX SDK (if you don't have it, get it--free from autodesk) but the VB.NET tutorial is gone in the 2009 SDK, so I will attach the 2007 version here, hopefully they won't pull it off. It has plenty of info about how to get a project created, define a command that can be called from autocad, and start doing some simple interaction with AutoCAD.


Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 3 of 6

chiefbraincloud
Collaborator
Collaborator
I was just pointed to a site that converts C# code into VB. Exxxxxceelllent.. (you have to read that like Mr. Burns is saying it)

http://www.de veloperfusion.com/tools/convert/csharp-to-vb/

so to test it, I ran the DataExtraction sample from Through The Interface, Through the Converter...

It worked like a charm. No errors as a result of the conversion, had one error due to a missing reference to System.Data.
Then I had to change the path to the sample file he had coded it to open, and voila.

Now, I'm sure there are a bunch of different settings for this as far as what kind of data to extract, and maybe even how to output it, but this should get you started. (It's definitely got me started, I want to see what this thing can do;-)

Edited by: chiefbraincloud on Oct 10, 2008 1:22 PM Forgot to add the link to the converter. I'm such a tease.....

Hey Autodesk Monitors... (and anyone trying to follow the link)
I put a post in the "test" forum yesterday about this, but I just noticed it again.. This editor put a SPACE in the hyperlink in the word 'developer' right after the first 'e'. Edited by: chiefbraincloud on Oct 10, 2008 1:25 PM
Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 4 of 6

ScottSpringfield
Explorer
Explorer
Hi! The links don't seem to work. Can you please re-post? Or paste the info here??
0 Likes
Message 5 of 6

chiefbraincloud
Collaborator
Collaborator
I don't know why the attachments are gone, because they did work when I first put them up, but the URLs weren't working because this forum editor put a %20 (for a Space) in the hyperlink where it shouldn't have been. I have attempted to fix them here, if they still don't work you can just paste the text into the address bar.



http://through-the-interface.typepad.com/through_the_interface/2008/04/extracting-data.html



http://www.developerfusion.com/tools/convert/csharp-to-vb/

This is like pulling teeth....

The Code Converter link seems to be working, but no matter what I do, I can't seem to get the Blog link to go in right...just paste this text.

http://through-the-interface.typepad.com/through_the_interface/2008/04/extracting-data.html
Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 6 of 6

chiefbraincloud
Collaborator
Collaborator

Wow this is fun....

I've edited that post so many times trying to make the Through the Interface link work, and It just won't... Now when I try to edit it, my last edit doesn't show up.

Plus even when I put the web address in as plain text, it keeps adding the hyperlink and breaking it by putting a space where it doesn't belong.

So let's try taking the http off and see if it will leave it as plain text this time.

through-the-interface.typepad.com/through_the_interfa ce/2008/04/extracting-data.html

Dave O.                                                                  Sig-Logos32.png
0 Likes