Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View Autocad Drawing Thumbnails in Access

Status
Not open for further replies.

jon51

Technical User
Mar 7, 2001
3
US
Autocad 2002, has a Today Windwow and Drawing Content Explorer that show a drawing Thumbnail. I think it is the activeX control AC.Preview.OCX. I was able to insert it into a form in MS Access. But I cant pass the drawing number to it. I tried the Custom Properties and get some mesaage about starting the OLE Servere outside of the application.

Is that the control, can I use it, must you have Autocad to use it. (Ive tried Whip and Voloview Express - too slow)
 
You could do it this way.

Goto Click on Download | Imageview
Download ImageView.cls

Import this to your Access Database as a class module

You will need to do a bit of editing

Find the following
Public Function GetDrawingPreview(dwgPath As String) As Boolean

Towards the end of this function is
Kill mvarFileName
Comment this line out

Add the following code to the class

Public Property Get PictureFileName() As String
' Return the picture file name
PictureFileName = mvarFileName
End Property

On a form, add a Command Button called cmdDwgPreview
and an image called imgDwgPreview.

Create the following sub

Private Sub cmdDwgPreview_Click()
Dim a As ImageView
Set a = New ImageView
a.GetDrawingPreview ("C:\temp\test.dwg")
imgDwgPreview.Picture = a.PictureFile
Kill a.PictureFile
End Sub

Run the form, click the button

Nick Hall
nick.hall@altasystems.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top