Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
JelteDeJong
in reply to: ianjwellings

You did not specify how you get the images, but i guess you use the camera class. Brian Ekins wrote a greate post about using the camera. you can find it here. In that post you will find the following code. in the last lines he shows how to set the background color when the picture is saved.

Private Sub CreateImage( _
              Apprentice As Inventor.ApprenticeServerComponent, _
              PartOrAssembly As Inventor.ApprenticeServerDocument, _
              Filename As String)
   ' Create a new camera.
   Dim cam As Inventor.Camera
   cam = Apprentice.TransientObjects.CreateCamera

   ' Associate the document with the camera.
   cam.SceneObject = PartOrAssembly.ComponentDefinition

   ' Define the camera and apply the changes.
   cam.ViewOrientationType = _
        Inventor.ViewOrientationTypeEnum.kIsoTopRightViewOrientation
   cam.Fit()
   cam.ApplyWithoutTransition()

   ' Save the result, defining the background color of the image.
   cam.SaveAsBitmap(Filename, 800, 600, _
           Apprentice.TransientObjects.CreateColor(255, 255, 0), _ 
           Apprentice.TransientObjects.CreateColor(15, 15, 15))
End Sub

 

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com