Jump to content

VB.Net Thumbnail Challenge


CaveMan

Recommended Posts

Busy developing a SQL Vb.Net Register

Want to pull the DWG thumbnail images into a picture frame on a form in VB.Net

Do find code that can extract thumbnails from an image file - like .jpg .bmp but not one that can extract the thumbnails for .dwg

Have a ocx .dwg thumbnail for 32Bit - however require dual 32 and 64Bit.

The development would be rather more flexible to be able to extract the tumbnails from any file types and render them in an image control in a database.

 

Ant assistance most welcome

Cheers

CaveMan

Link to comment
Share on other sites

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    7

  • irneb

    7

  • CaveMan

    4

  • Jeff H

    3

Top Posters In This Topic

Posted Images

I'm not sure how he's doing it, but the image manipulator I use (XNView) displays and even opens DWG thumbnails without a problem (on Win32/64 and even in Linux). I'm guessing it's some sort of C++ library though - not .Net.

Link to comment
Share on other sites

Hi Jeff

 

Cheers for the links - when times available will test the source code

Thanks a lot not always so easy to find good examples.

 

When i have it figured shall post an example for other users

So far your winning Mate!

 

:shock: We may at times achieve masterful applications with copy and paste programmimg.

Help Appreciated

Link to comment
Share on other sites

What is the name of the .Net programming language editor or program (is it free ?) ?

 

And is it the same like Visual Lisp editor to get the information by Help book ?

 

Thanks

Link to comment
Share on other sites

Visual Studio

 

Visual Studio Express is free and if you are a student-----have a email that ends in .edu you can get VS Pro for free

Link to comment
Share on other sites

Do a google for Visual Studio Express. MS gives that one for free. I'd advise going with the 2008 one however, there's some hiccups to get the 2010 one working with the wizards to start an AutoCAD thing easily ... unless you go with the newest ACads.

 

Then a good resource which helped me a lot is: http://through-the-interface.typepad.com/through_the_interface/2006/07/getting_started.html

 

As for the help, no: unfortunately that's not so easy. To have debugging working you need to start from the wizard as it sets some stuff to open ACad in debug mode. The wizard is part of the ObjectARX SDK which you'll need to download to get the libraries to work in VS. It also includes the ObjectARX as well as Managed (i.e. DotNet) help files which you can double click on to open.

Link to comment
Share on other sites

Hi

 

In my opinion the two greates development links you can get for AutoCAD

MS Visual Studio used to develop 3rd party apps for AutoCAD

Express edition is free - really powerful tools.

 

http://www.microsoft.com/express

 

http://docs.autodesk.com/ACD/2011/ENU/filesMDG/WS1a9193826455f5ff2566ffd511ff6f8c7ca-4875.htm

 

Cheers and Enjoy

 

CaveMan

Link to comment
Share on other sites

Thanks Jeff H.

I am not a student and do not have a student email and have not use it before . :)

 

I have found the Visual Studio express and lots of different products that confused me to chose the right one which deal with cad .http://www.microsoft.com/visualstudio/en-us/products

 

irneb the link you have posted is not working and I could not open it because it's been looking for the web for a while without a result .

 

Please , steel in need of clarifications.

 

Many thanks.

Link to comment
Share on other sites

Strange it works fine for me. Are you perhaps behind some firewall or so?

 

Anyhow, the link CaveMan gave sends you to Visual Studio Express 2010's download page. You'll need to decide what you want: Visual Basic / Visual C# / Visual C++.

 

If you want the 2008: http://msdn.microsoft.com/en-us/express/future/bb421473

 

If you want the even older 2005: http://apdubey.blogspot.com/2009/04/microsoft-visual-studio-2005-express.html

Link to comment
Share on other sites

Thank you irneb .

 

I am in the process of downloading the Visual basic 2010 Express and it is 150 Mb (file size) and I can see that there are lots of attached programs within this download .

 

Am I on the right way ?:)

Image-1.jpg

Image-2.jpg

Link to comment
Share on other sites

Yep, that's the online installer for VB.Net. I've actually searched for an off-line install. Can't remember where I got it but it was something like a 600MB ISO file to be burned to CD. But that one should also work fine.

 

After you've got that installed you need to download the SDK for your ACad version from here: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550

 

And then after you've installed that (usually installs to something like C:\ObjectZRX20##\ ) you will find something like an ArxWizards.MSI file under the utils folder or one of its sub-folders. That will install the "template" to start an ACad DotNet thing into Visual Studio.

 

If you then open VB.Net you can start a new Project and select the "AutoCAD 20## plug-in" from the templates. Give your project a name and click OK. It should ask you for a few things (like where are the libraries to load, if these weren't automatically installed - usually in c:\ObjectARX\inc\ or alternatively in the ACad program folder). Then you should have a project with various files. Usually something like a My Project, myCommands.vb and myPlugin.vb. The last one is for special initialization when your DLL is being called from ACad. The myCommands has some samples of different ways to create commands and a sample lispfunction.

Link to comment
Share on other sites

Tharwat, you are quite persistent about getting into .NET after our breif discussion(s) yesterday. LoL

 

As Jeff H (and I think Irneb?) already know about me, I am NO expert with .NET development... in fact I am just a beginner still, however, I do know enough to write basic commands in both C#, and VB.NET and know how to enable proper debugging (to include stopping for breakpoints, etc.) using Visual Studio 2010 Express.

 

We can go into specifics about how to potentially modify "acad.config," but this will get you started with debugging:

 

 

Snippet from .vbproj:

 ...
 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
[color=blue]   <StartAction>Program</StartAction>[/color]
[color=blue]   <StartProgram>C:\[/color][color=#ff0000]<FilePath>[/color][color=blue]\acad.exe</StartProgram>[/color]
[i][color=black]   ...[/color][/i]
 </PropertyGroup>
 ...

 

So, sorry I missed this thread (until now), I may have been able to prevent the accidental hijacking of this thread. :oops:

Link to comment
Share on other sites

Thanks irneb , I have to install the SDK as you have recommended me , and I think I have installed it before and due to lack of information in that time , I uninstalled it .

 

Thanks Jeff H for your tips , highly appreciated . The one that I have just finished installing it , it works with Windows & 32 OS and I guess it is OK except

sometimes I feel it is a little bit heavy and it takes a few seconds to implement or invoke any action .

 

RenderMan , Thank you .

 

I have got to be involved into .net since that it is recommend and lots of people turning their intentions to it .

 

I believe that I have a long way to through and hope not to be a lone . :)

 

Best regards for you all .

 

Tharwat

Link to comment
Share on other sites

After you've got that installed you need to download the SDK for your ACad version from here: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550

 

As I already mentioned that I have installed it before and the following image reminders me of the installation process very well now .

 

May be it is not applicable with Windows 7 ? I do not think so and I did install it on Win 7 64 OS without a result either .

 

Thanks

Image-1.jpg

Link to comment
Share on other sites

That actually looks like the file wasn't downloaded completely. That CRC failed is a check which WinRar (which is what ADesk's used to make this file) uses to see if the files it's extracting is correct. And then the "Unexpected end of archive" means there should have been more of that file.

 

All I can say is you might need to re-download that ObjectARX####.EXE file again, and hope it downloads correctly. BTW, I've found this type of scenario quite often with Internet Explorer - it simply stops when the download fails, whereas Chrome/FireFox usually shows you that there was something wrong. But in most cases I prefer using a "true" download manager (e.g. FDM) as most of them can at least resume a download instead of simply restarting it (saves me a lot of my expensive bandwidth).

 

I know you're not at that point yet, but I've made a small lisp I place into my acaddoc.lsp:

(defun c:Debug (/ path name)
 (vl-load-com)
 (setq path (getvar 'DwgPrefix))
 (foreach name (vl-directory-files path "*.DLL" 1)
   (command "._NETLOAD" (strcat path name))
 )
 (princ)
)

Then I simply isse Debug on the command line and it loads all the DLL's in the current directory. Otherwise you need to do a NetLoad when debuging from VB/C#.

Link to comment
Share on other sites

irneb , even after reinstalling it once again and extracting the .RAR compressed folder to another folder I faced the same problem and I do remember this happened to

along time a go at home also when I tried to install it at 64 OS .

 

That's odd isn't it ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...