AnsweredAssumed Answered

Save current view as png with background removed (api)

Question asked by Derek Eldridge on Mar 5, 2019
Latest reply on Mar 13, 2019 by Derek Eldridge

Is there a way, to save a screen capture (Image Capture) as a png with the background removed?

 

The saveas png does remove the background, but the limitation is that if you are in an isolated view, all the hidden components come back for the saveas command. I only want to capture what I'm currently looking at.

 

Using 2018 SOLIDWORKS API Help - SaveBMP Method (IModelDoc2) I can successfully save a screen capture as a bmp, or even a png. Though, neither removes the background.

 

The following method will copy the image to the clipboard, still containing a background, and does not save it.

Using swCommands_ScreenCapture in 2018 SOLIDWORKS API Help - swCommands_e Enumeration

 

There was a prior post that got me this far but it doesn't answer the background removed question: Saving Image Capture to File

https://forum.solidworks.com/message/574316?q=Save%20current%20view%20as%20png%20with%20backround%20removed

Outcomes