VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ImageView.cls

2 REPLIES 2
Reply
Message 1 of 3
awa139
606 Views, 2 Replies

ImageView.cls

Hello All - Has anyone had any experience using the attached class to get the drawing preview from a drawing file. Class renamed from .cls to .txt so it could be uploaded. I can successfully use the function GetDrawingPreview on a 2008 drawing of some circles and lines and it returns True. But I can't figure out how to get the bitmap to load to a image or picture control. Thanks in advance.
2 REPLIES 2
Message 2 of 3
awa139
in reply to: awa139

figured it out

Dim iThumbView As ImageView

Private Sub Command1_Click()
Set iThumbView = New ImageView

Dim didit As Boolean

didit = iThumbView.GetDrawingPreview("g:\tester.dwg")
picDrawingPreview.Picture = iThumbView.Picture

End Sub
Message 3 of 3
Anonymous
in reply to: awa139

Hi,

 

Has anyone had a problem with using this classmodule with ACAD 2010?

 

The code behaves differently from 2009 version.

 

Within GetDrawingPreview the call to copymemory returns a zero so i assume the buffer structure has changed from 2009, does any-one have a revised classmodule or knowledge of the buffer to enable us to cater for 2010 differences?

 

Thanks

Martin

 

 

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost