I know this has been asked before but apparently the solutions are not valid for 2011.
I am wblocking a dwg file. The new file doesn't have a preview and I need it to have one.
When another poster asked about preview images for AutoCAD 2010 Tony wrote:
"In AutoCAD 2010 or later, you can call the
Document's CreatePreviewImage() method,
and assign the result to the Database's
ThumbnailBitmap property."
Which he then appended to say: "Doesn't work in 2011."
As usual he is correct.
I have tried opening the saved dwg to zoom it's extents and save it. When I do this in AutoCAD is creates the preview. When I do it programmatically it does not.
I've tried managed and interop.
I have tried SendStringToExecute and SendMenuStringToExecute and interop ZoomExtents and Tony's CommandLine.cs.
Is there a solution in 2011?
AFAIK, they broke it in 2011, and it's still broken. The only
other solution is to write your own in native ObjectARX,
using undocumented APIs.
Breaking existing APIs that were working, is something
that gives me reason for concern, because when you
can't rely on a developer to adequently maintain their
published APIs, it means they can rely on them for much
of anything at all.
And for the record, I was one of those that made the
mistake of relying on them and this API, and that has
cost me.
It's just one of many examples of why Autodesk is only
your 'partner' in profit, but not in loss.