.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Acad2010 thumbnail

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
1023 Views, 10 Replies

Acad2010 thumbnail

I have a programm in Autocad 2009 that change something in a series of Dwg
and when i make closeandsave(filename) store also the thumbnail.
I see the preview in explorer.
Now i have install Acad2010 and recompile the program with the new
library,but the closeandsave(filename) don't store the thumbnail.
Some help?
thanks in advance.
GPQ
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

In AutoCAD 2010 or later, you can call the
Document's CreatePreviewImage() method,
and assign the result to the Database's
ThumbnailBitmap property.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"GPaolo" wrote in message
news:6379160@discussion.autodesk.com...
I have a programm in Autocad 2009 that change something in a series of Dwg
and when i make closeandsave(filename) store also the thumbnail.
I see the preview in explorer.
Now i have install Acad2010 and recompile the program with the new
library,but the closeandsave(filename) don't store the thumbnail.
Some help?
thanks in advance.
GPQ
Message 3 of 11
gpq
Enthusiast
in reply to: Anonymous

Yes,i have see it and i have already try it,but when i save in Acad i obtain a thumbnail with white background color (in explore) when i create thumbnail by program with the function "CreatePreviewImage" i obtain a thumbnail indefinite and with black background color like my background color in Acad.
Any other suggestion?
Thanks and good week-end.
GPQ
Message 4 of 11
Anonymous
in reply to: Anonymous

The thumbnail stored in the database should be the
same as the one returned by CapturePreviewImage().

It's possible that the background color is manipulated
when Explorer requests the thumbnail.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message
news:6379790@discussion.autodesk.com...
Yes,i have see it and i have already try it,but when i save in Acad i obtain a
thumbnail with white background color (in explore) when i create thumbnail by
program with the function "CreatePreviewImage" i obtain a thumbnail indefinite
and with black background color like my background color in Acad.
Any other suggestion?
Thanks and good week-end.
GPQ
Message 5 of 11
Anonymous
in reply to: Anonymous

If you're using AutoCAD 2011, then don't bother with this method.

Autodesk apparently has broken this method an if you call it
AutoCAD will stop responding.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message
news:6379790@discussion.autodesk.com...
Yes,i have see it and i have already try it,but when i save in Acad i obtain a
thumbnail with white background color (in explore) when i create thumbnail by
program with the function "CreatePreviewImage" i obtain a thumbnail indefinite
and with black background color like my background color in Acad.
Any other suggestion?
Thanks and good week-end.
GPQ
Message 6 of 11
Anonymous
in reply to: Anonymous

No,i use Acad2010.
My Background color in Acad2010 is black like in Acad2009 and if i save the
drawing by Acad the thumbnail that i see is correct.
If i save the same drawing by .net program i don't obtain the same thing.
Thank's.
GPQ


"Tony Tanzillo" ha scritto nel messaggio
news:6379897@discussion.autodesk.com...
If you're using AutoCAD 2011, then don't bother with this method.

Autodesk apparently has broken this method an if you call it
AutoCAD will stop responding.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message
news:6379790@discussion.autodesk.com...
Yes,i have see it and i have already try it,but when i save in Acad i
obtain a
thumbnail with white background color (in explore) when i create thumbnail
by
program with the function "CreatePreviewImage" i obtain a thumbnail
indefinite
and with black background color like my background color in Acad.
Any other suggestion?
Thanks and good week-end.
GPQ
Message 7 of 11
Anonymous
in reply to: Anonymous

version Acad2009:

doc.LockDocument.Dispose()

doc.CloseAndSave(NomeDwg)

doc.Dispose()

I have replace it in Acad2010 version with :
'Dim bm As Bitmap = doc.CapturePreviewImage(128, 102) Not used

'doc.Database.ThumbnailBitmap() = bm
Not used

doc.Database.SaveAs(NomeDwg, True, AcDbs.DwgVersion.Current,
doc.Database.SecurityParameters)

doc.LockDocument.Dispose()

doc.CloseAndDiscard()

doc.Dispose()

***********************************************************
Now all work fine like in Acad2009 version.

Thank's Tony

"Tony Tanzillo" ha scritto nel messaggio
news:6379897@discussion.autodesk.com...
If you're using AutoCAD 2011, then don't bother with this method.

Autodesk apparently has broken this method an if you call it
AutoCAD will stop responding.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message
news:6379790@discussion.autodesk.com...
Yes,i have see it and i have already try it,but when i save in Acad i
obtain a
thumbnail with white background color (in explore) when i create thumbnail
by
program with the function "CreatePreviewImage" i obtain a thumbnail
indefinite
and with black background color like my background color in Acad.
Any other suggestion?
Thanks and good week-end.
GPQ
Message 8 of 11
Anonymous
in reply to: Anonymous

Great, but don't expect it to work in 2011.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"GPaolo" wrote in message
news:6380212@discussion.autodesk.com...
version Acad2009:

doc.LockDocument.Dispose()

doc.CloseAndSave(NomeDwg)

doc.Dispose()

I have replace it in Acad2010 version with :
'Dim bm As Bitmap = doc.CapturePreviewImage(128, 102) Not used

'doc.Database.ThumbnailBitmap() = bm
Not used

doc.Database.SaveAs(NomeDwg, True, AcDbs.DwgVersion.Current,
doc.Database.SecurityParameters)

doc.LockDocument.Dispose()

doc.CloseAndDiscard()

doc.Dispose()

***********************************************************
Now all work fine like in Acad2009 version.

Thank's Tony

"Tony Tanzillo" ha scritto nel messaggio
news:6379897@discussion.autodesk.com...
If you're using AutoCAD 2011, then don't bother with this method.

Autodesk apparently has broken this method an if you call it
AutoCAD will stop responding.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message
news:6379790@discussion.autodesk.com...
Yes,i have see it and i have already try it,but when i save in Acad i
obtain a
thumbnail with white background color (in explore) when i create thumbnail
by
program with the function "CreatePreviewImage" i obtain a thumbnail
indefinite
and with black background color like my background color in Acad.
Any other suggestion?
Thanks and good week-end.
GPQ
Message 9 of 11
josano
in reply to: Anonymous

Hello,

I tried using the above code with c # but I could not use CreatePreviewImage () method.
Can anyone help me how do I get the thumbnail and display it in a picturebox in autocad 2008?

Thanks,
Josano Edited by: josano on Apr 26, 2010 1:27 PM
Message 10 of 11
Anonymous
in reply to: Anonymous

There is ocx that make this job ,but i have found from other developer a
class that i have modify to change also the background color of thumbnail.
Try to use it.
Ciao


ha scritto nel messaggio news:6380348@discussion.autodesk.com...
Hello,

I tried using the above code with c # but I could not use
CreatePreviewImage () method.
Can anyone help me how do I get the thumbnail and display it in a
picturebox in autocad 2008?

Thanks,
Josano

Edited by: josano on Apr 26, 2010 1:27 PM
Message 11 of 11
tim-bot
in reply to: Anonymous

yes, the CapturePreviewImage in 2011 is definitly broken good, any ideas on a better way to grab the screen? i might just use the regular .net screen shot and clip the image myself that way, though, i would perfer the capturepreviewimage B(

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost