Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Save as thumbnail as a file in vba?

4 REPLIES 4
Reply
Message 1 of 5
mucip
1450 Views, 4 Replies

Save as thumbnail as a file in vba?

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:)

4 REPLIES 4
Message 2 of 5
YuhanZhang
in reply to: 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.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Message 3 of 5
Projetos2013
in reply to: YuhanZhang

Coul I sava the Thumbnail on another folder, for a different path?

Message 4 of 5
Projetos2013
in reply to: YuhanZhang

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.

Message 5 of 5
mucip
in reply to: Projetos2013

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:)

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

Post to forums