Script to save MoI screen shot w/ transparent BG to clipboard

 From:  pior (PIOR_O)
10393.10 In reply to 10393.9 
Well, this is *exactly* it ! All I had to do was to feed it square values (in this present case, 4096*4096), otherwise I somehow end up with a smaller rendered "page" inside the full render - and then all I have to do is to crop the result down to 4096*2048 in PS. This basically saves me about 10 minutes of exporting/importing back and forth to other vector applications just to get my precise lineart render out of MOI. And with the ability to render to clipboard I don't even have to worry with intermediate files anymore either. And of course everything lines up perfectly with the original layout, this is brilliant. Thank you so much !

FWIW the full code turns out to be :

script: var objs = moi.geometryDatabase.getSelectedObjects(); var vp = moi.ui.getActiveViewport(); if ( vp.projection == 'Parallel' && objs.length > 0 ) { vp.reset( 'selected' ); var bbox = objs.getHighAccuracyBoundingBox(); vp.fieldOfViewAngle = bbox.yLength; }; var prev_background = moi.view.viewportBackgroundColor; moi.view.viewportBackgroundColor = 0xFFFFFF; moi.view.lineWidth = 2; moi.grid.display = false; moi.grid.showXYAxes = false; moi.view.showAxisIcon = false; moi.view.showViewTitles = false; var img = null; try { img = moi.ui.getActiveViewport().renderToClipboard( 4096, 4096 ); } catch(e){} moi.view.lineWidth = 1; moi.grid.display = true; moi.grid.showXYAxes = true; moi.view.showAxisIcon = true; moi.view.showViewTitles = true; moi.view.viewportBackgroundColor = prev_background;

EDITED: 12 Aug 2021 by PIOR_O