Acad2010 thumbnail

Acad2010 thumbnail

Anonymous
Not applicable
1,667 Views
10 Replies
Message 1 of 11

Acad2010 thumbnail

Anonymous
Not applicable
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
0 Likes
1,668 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable
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
0 Likes
Message 3 of 11

gpq
Enthusiast
Enthusiast
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
0 Likes
Message 4 of 11

Anonymous
Not applicable
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
0 Likes
Message 5 of 11

Anonymous
Not applicable
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
0 Likes
Message 6 of 11

Anonymous
Not applicable
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
0 Likes
Message 7 of 11

Anonymous
Not applicable
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
0 Likes
Message 8 of 11

Anonymous
Not applicable
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
0 Likes
Message 9 of 11

Anonymous
Not applicable
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
0 Likes
Message 10 of 11

Anonymous
Not applicable
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
0 Likes
Message 11 of 11

tim-bot
Advocate
Advocate

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(

0 Likes