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

Product Images For MRP Software

Charlie-24
Enthusiast

Product Images For MRP Software

Charlie-24
Enthusiast
Enthusiast

Hi,

 

We need to take images of our designs for our MRP software and also some inhouse software  used by the shop floor, we are currently using a screenshot tool plugin that is great as we want white backgrounds and a consistent square resolution

 

The plug in we use is:

 

https://apps.autodesk.com/INVNTOR/en/Detail/Index?id=9103249803369100603&appLang=en&os=Win64

 

However this doesn't look like it is being updated past Inventor 2021,  other than changing the background of the viewport to white and using the snipping tool and resizing the image is there another way of getting the images? We have thousands of parts so looking for the quickest way to accomplish this.

 

Many thanks

0 Likes
Reply
Accepted solutions (1)
593 Views
6 Replies
Replies (6)

James_Willo
Autodesk
Autodesk

It depends how big you want them. 

You can export the BOM as an excel file and get all the thumbnails that way. They will have the background they were saved with and not white though. 

 

There's obviously the export command on the file menu, save as png with alpha channel (click the options before save) to get transparent background. When you open this in another program to crop it square, save as jpg and the transparency will become white. 

 

Snagit is amazing if you want to screenshot at specific sizes consistently, but won't change the background. 

 

If you are using a gradient as your background, the quickest way to change it is to set up a colour scheme where the gradient is white to white, this way you can just switch to a different scheme without having to change it from gradient to single colour. 

 



James W
Inventor UX Designer

James_Willo
Autodesk
Autodesk

OK, so I'm NOT and have never been an iLogic specialist, so please test this before rolling it out to anyone, but this code will change the colour scheme, export an image and then switch it back to the previous colour scheme. 

(You'll still need to crop it after)

 

 

oSaveLoc = ThisDoc.Path & "/"    'will save in same place as part, can change this to what you want
oColour = "Sky" 'change this to whatever scheme has white background

oFile = oSaveLoc & ThisDoc.FileName(False) & ".jpg" 'change to png if you like
oCurrentColour = ThisApplication.ActiveColorScheme.Name

Try
ThisApplication.ColorSchemes(oColour).Activate
ThisDoc.Document.SaveAs(oFile, True)
ThisApplication.ColorSchemes(oCurrentColour).Activate
Catch
End Try

 



James W
Inventor UX Designer

CGBenner
Community Manager
Community Manager

@Charlie-24 

I always used to use a Shared View, and then took my screenshots from the Viewer, with the background set to white.


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project

Charlie-24
Enthusiast
Enthusiast

Thanks @James_Willo @CGBenner for your replies, i need to experiment and works best for us.

 

The ilogic code works brilliantly, I can't code but can run the ilogic fine. My only issue is id like to make the image 600 x 600 - I've tried putting it through chatgpt and fudging around with the code a little but can't get it to do what I need.

 

The current code is:

 

oSaveLoc = ThisDoc.Path & "/"    'will save in same place as part, can change this to what you want
oColour = "Presentation" 'change this to whatever scheme has white background

oFile = oSaveLoc & ThisDoc.FileName(False) & ".jpg" 'change to png if you like
oCurrentColour = ThisApplication.ActiveColorScheme.Name

Try
    ThisApplication.ColorSchemes(oColour).Activate
    ThisDoc.Document.SaveAs(oFile, True)
    ThisApplication.ColorSchemes(oCurrentColour).Activate

    ' Resize image to 600x600 pixels
    Dim oImage As System.Drawing.Image = System.Drawing.Image.FromFile(oFile)
    Dim oResizedImage As System.Drawing.Image = oImage.GetThumbnailImage(600, 600, Nothing, IntPtr.Zero)
    oImage.Dispose()
    System.IO.File.Delete(oFile)
    oResizedImage.Save(oFile, System.Drawing.Imaging.ImageFormat.Jpeg)
    oResizedImage.Dispose()
Catch
End Try

 

This leaves me with the error "Type 'System.drawing.image' is not defined".

 

I've investigated this and found that I needed to turn on  the reference system.drawing.dll in the VBA editor. However even after doing this the error persists. Is there any way around this?

 

Thanks in advance

0 Likes

MjDeck
Autodesk
Autodesk
Accepted solution

There's another way to save a bitmap. You can save it from the Camera object. That lets you specify the image size and the background color. Try this:

oSaveLoc = ThisDoc.Path & "\"    'will save in same place as part, can change this to what you want
oFile = oSaveLoc & ThisDoc.FileName(False) & ".jpg" 'change to png if you like

Dim backgroundColor = ThisApplication.TransientObjects.CreateColor(255, 255, 255)
ThisApplication.ActiveView.Camera.SaveAsBitmap( oFile, 600, 600, backgroundColor, backgroundColor)

Mike Deck
Software Developer
Autodesk, Inc.

Charlie-24
Enthusiast
Enthusiast

Thank you so much! @MjDeck 

 

I've added this to a macro and assigned a keyboard shortcut to it - Its better now than the addin we currently use 🙂