Hi,
I need to save as thumbnails (like jpg or bmp or png file...?) in other directory in VBA. I seen lots of examples but in 32 bit with ThumbnailView companent.
I need to get this in Inventor VBA and 64 bit system and I do not want to install any other companent... Possible?...
Using Inventor 2013 and Win 7 64 bit...
Regards,
Mucip:)
Unfortunately in 64bit Inventor 2013 the VBA editor is running in a host process which is out-of-process against Inventor, and so you are not able to access the thumbnail(iPictureDisp) of Inventor document. You can refer to the blog below for details:
http://modthemachine.typepad.com/my_weblog/2010/03/document-thumbnails-and-button-icons.html
But as mentioned in the blog, you can create an application to use ApprenticeServer to access the thumbnail of Inventor document in 64bit machine. Hope this helps.
Could I save the Thumbnail on another folder, on a different path?
I didn't understand the way it was saved in the same folder where is the original "ipt" file, so I wonder if it could be saved in a determined folder (path) that I would appoint in the sub.
Hi,
I am fallowing the other way. I open the file and save as jpg file. And I wrote a code to this automaticly as below...
Sub cameraAndSaveAsBitmap(ByVal GelenYol As String)
'Bu kod açık dosya üzerindeki parçayı geni açıya alıyor ve görüntüyü
'c:\temp\ dizini içerisine DosyaAdı.bmp olarak kaydediyor.
Dim oView As View
Dim FileNameAsYouWish As String
Dim ResimNo As String
Dim StokKod As String
oView = inv_App.ActiveView
Dim oCamera As Camera
oCamera = oView.Camera
oCamera.Fit()
'oCamera.Apply()
oCamera.ApplyWithoutTransition()
Call oView.SaveAsBitmap(FileNameAsYouWish, 400, 240)
You can open any file automaticly and run this code.
Regards,
Mucip:)