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 Embedding image from part

1 REPLY 1
SOLVED
Reply
Message 1 of 2
maxstels
321 Views, 1 Reply

Save Embedding image from part

How Save kOLEDocumentEmbeddingObject (image) from Sketch Method ReferencedOLEFileDescriptor.Activate not worked for many embedding object Use AIP 2014 Pro
1 REPLY 1
Message 2 of 2
Vladimir.Ananyev
in reply to: maxstels

Dear maxstels,

In your particular case images are used by DecalFeature.

 

Browser_DECAL_Feature.png

So these images could be easily get as iPictureDisp objects and saved into file on disk.

Here is the VBA sample code:

 

Sub Test_DECAL()
  Dim oDoc As PartDocument
  Set oDoc = ThisApplication.ActiveDocument
  Dim oDef As PartComponentDefinition
  Set oDef = oDoc.ComponentDefinition
  
  Dim oDecal As DecalFeature
  Set oDecal = oDef.features.DecalFeatures.Item(1)
  
  Dim oSketchImage As SketchImage
  Set oSketchImage = oDecal.Image
  
  Dim oImage As IPictureDisp
  Set oImage = oSketchImage.Image

  Dim Filename As String
  Filename = "c:\temp\AAA.bmp"  
  Call SavePicture(oImage, Filename)
  Beep
End Sub

 You may find useful the following post as well:

http://adndevblog.typepad.com/manufacturing/2013/07/how-to-save-on-the-disk-the-thumbnail-image-of-a...

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report