@mswaidan wrote:
I’m working on a c# plugin that batch captures selected named views & display modes. Pseudo code:
void CaptureViews() { foreach (namedView in selectedNamedViews) { activeView = namedView foreach (displayMode in selectedDisplayModes) { activeView.DisplayMode = displayMode activeView.Redraw() bitmap = activeView.CaptureToBitmap bitmap.Save() } } }
For some of the heavier display modes (e.g. Arctic), the captured file didn’t match the display mode, so I made
CaptureViews()
async and addedawait Task.Delay(TimeSpan.FromSeconds(1));
after theRedraw()
. This is working, but it doesn’t seem like a great solution. Is there a proper way to check whetherRedraw()
has completed?
Posts: 2
Participants: 2