Reply

Thumbnail

[ Edited ]

Hello,

 

is this possible to show a Thumbnail from a

SE-File without to open the file with SE ?

 

I don´t want to use the SEPreview.ocx.

 

 

Is there a way ?

 

 

 

Greeting from Joachim

 

Posted by: Joachim Schuhböck
Post date: 4/10/2006 11:50:29 PM

14 REPLIES

RE: Thumbnail

[ Edited ]

Joachim,

 

I looked for my code but I can't find it. I'll see what I can come up with for you though. I know I took some existing code off of www.codeproject.com. I just need to find it again. I'll let you know.

 

Posted by: Jason Newell
Post date: 4/12/2006 5:45:23 AM

RE: Thumbnail

[ Edited ]

Hi Jason,

 

here's your code... (I've translated it to VB.Net if anyone is interested)

 

 

 

Posted by: Calum McLellan
Post date: 4/19/2006 10:14:16 PM

RE: Thumbnail

[ Edited ]

 

Hi Calum,

I would be interested in getting this code in VB if you still have it.

Best Regards,

Tom

 

Posted by: Tom Harris
Post date: 9/1/2009 4:02:18 PM

RE: Thumbnail

[ Edited ]

 

Hi Tom,

 

here's the VB.Net version.

 

Cheers

Calum

 

Posted by: Calum McLellan
Post date: 9/2/2009 10:06:46 AM

RE: Thumbnail

[ Edited ]

Thanks Calum,

 

Works a treat.

 

Best Regards,

Tom

 

Posted by: Tom Harris
Post date: 9/2/2009 11:59:08 AM

RE: Thumbnail

[ Edited ]

Hi Tom,

 

you can also make it different, using SeThumbnail.dll:

 

Dim SEThumb As New SeThumbnailLib.SeThumbnailExtractor

Dim hImageSE As Integer

Dim imagePic As Image

 

SEThumb.GetThumbnail(sFileName, hImageSE)

imagePic = Image.FromHbitmap(hImageSE)

....

 

Cheers

JR

 

Posted by: JR
Post date: 9/2/2009 7:31:45 PM

RE: Thumbnail

[ Edited ]

hello Jason,

 

I am working with VB6, you have mentioned above codes for VB6,

Hi Tom,

 

you can also make it different, using SeThumbnail.dll:

 

Dim SEThumb As New SeThumbnailLib.SeThumbnailExtractor

Dim hImageSE As Integer

Dim imagePic As Image

 

SEThumb.GetThumbnail(sFileName, hImageSE)

imagePic = Image.FromHbitmap(hImageSE)

....

 

Cheers

JR

 

can you alaborate more, I want to save thumbnails to respective folders for part and assemblies, whats the code to save an image, can you mention above code in detai

 

please reply asap

l

 

Posted by: Ravindra Borhade
Post date: 7/26/2011 9:29:24 PM

RE: Thumbnail

[ Edited ]

It's not that I don't want to help you, it's that I find VB6 so incredibly old and limited.  I guess I'm getting old ;-).

 

Here is the exact VB6 code to extract the thumbnail using the SeThumbnailLib type library.  If you were using .NET, I could easily tell you to use System.Drawing.Bitmap.FromHbitmap() from which you could then use System.Drawing.Bitmap.Save(). Your homework is to google to the end of earth until you can find an example to save the hBitmap to a file.  I did some searching on my own but couldn't find exactly what I was looking for.  Hopefully you'll have more luck.

Private Sub Example() Dim objExtractor As SeThumbnailLib.SeThumbnailExtractor Dim hBitmap As Long Set objExtractor = New SeThumbnailLib.SeThumbnailExtractor Call objExtractor.GetThumbnail("C:\Part1.par", hBitmap) ' Now save the hBitmap to a file. Not sure who to do that in VB6. objExtractor = NothingEnd Sub

 

Posted by: Jason Newell
Post date: 7/26/2011 11:35:37 PM

RE: Thumbnail

[ Edited ]

ok, I will learn visual basic.net

can you just give me code for .net

may be that will be useful for me....

 

actually I have used a custom macro BOM from solidedge/programfiles/solid edge

that is coded in the VB6 and I modified it as per my need..now I want do extract thumbnails from same macro..thats y I was looking for code.

 

now I have to make that macro in vb.net and will then do rest things

 

thanks for your help

 

Posted by: Ravindra Borhade
Post date: 7/27/2011 1:56:10 AM