Hi Guys,
I would like to show the preview of a block in a form, using an object of type image, is this possible?
It would be something very similar to what autocad does in its block insertion menu:
Note that: The block is not an external file from which I can extract the thumbnail, it is only in the drawing itself.
I thought I would easily find a .preview or .icon property in Acadblock, but I didn't find ...
Any idea?
Thanks in advance
Solved! Go to Solution.
Solved by seabrahenrique. Go to Solution.
Hi, seems somebody in the past already solved your issue if I understood well.
https://forums.autodesk.com/t5/net/how-to-get-a-block-s-preview-image/m-p/5611510#M44292
@grobnik , The OP did not say whether he/she uses VB.NET with AutoCAD .NET API, or VBA. the solution you referred to only works with .NET API. If the OP is meant for VBA (that is this forum for), he/she would be out of luck: there is no viable way to do it with 64-bit VBA.
Norman Yuan
Guys, i didn't even remeber this post, but i finded a class library tath can make this possible even in VBA.
Placed here in attachment.
Remeber to change the local file "mvarFileName = "???" to another folder in your computer, after tath, all u need to do is declare and call the class, like this:
Set obj = New ImageView
obj.GetDrawingPreview "PATH OF DWG FILE HERE"
Image1.Picture = obj.Picture
Something else to work is save drawing in AutoCAD 2010 format.
Example of use and prove tath it works:
It was very dificult to finded this solution, i hope help anoher people.
Can't find what you're looking for? Ask the community or share your knowledge.