Hide Parts Selection

I’m trying to create an image of my diagram for use on a report. I am using Diagram.Panel.MakeBitmap() to create the image for use on the report but it shows the currently selected parts.

Currently I am saving the collection of currently selected parts, deselecting them the reselecting them after I capture the image but I am looking for a more efficient method.

I have tried Part.SelectionAdorned = false but this leaves the handles around the selected items.

Is there a more efficient way to hide the selection around my parts or a better way to capture the image?

Copying Diagram.SelectedParts, Clear()'ing that collection, and afterwards selecting everything should be fast enough. How long is it taking?

It’s not currently a speed issue but I do run some code when the selection changes. I’m wondering if there is a better way to hide the selection rather then clearing the selected items then reselecting everything.

Hmm. You could try temporarily changing the “Adornment” Layer’s Visibility.

That works, thanks.