Show messages: All
1-7
8-12
From: Tim (TIMM)
Hi Mip
Thanks for the script...not too familiar with script usage, so will have to work out how to insert.
Many thanks for reply anyhows
Tim
From: Michael Gibson
Hi Tim, for using the script in Mip's message above, go to Options > Shortcut keys and push the "Add" button and then press what key combination you want to trigger it. Then paste in the script code for the "Command" value of the shortcut key.
- Michael
From: Tim (TIMM)
Hi Mip
Thanks for this, worked a treat.
T
From: Tim (TIMM)
Hi Michael,
Thanks for this, managed to paste in script and use OK. One thing though, my screen put the grid on after using the script, had to go into Options to remove the grid. I was using short cut key as Mip had used Ctrl, Alt, S. Any idea why grid appeared back on screen?
thanks
Tim
From: Michael Gibson
Hi Tim,
re:
> Any idea why grid appeared back on screen?
It's just what the script does - it turns off the grid, takes the snapshot, then turns on the grid.
Try this variation which will save the current grid display state and restore it instead of just turning it off and on:
script: /* Generate viewport image white background 4000, 2500 linewidth : 4 */ var prev_background = moi.view.viewportBackgroundColor; moi.view.viewportBackgroundColor = 0xFFFFFF; var prev_linewidth = moi.view.lineWidth; moi.view.lineWidth = 4; var prev_griddisplay = moi.grid.display; moi.grid.display = false; var prev_showxyaxes = moi.grid.showXYAxes; moi.grid.showXYAxes = false; var prev_showaxisicon = moi.view.showAxisIcon; moi.view.showAxisIcon = false; var prev_showviewtitles = moi.view.showViewTitles; moi.view.showViewTitles = false; var img = null; try { img = moi.ui.getActiveViewport().render( 4000, 2500 ); } catch(e){} moi.view.lineWidth = prev_linewidth; moi.grid.display = prev_griddisplay; moi.grid.showXYAxes = prev_showxyaxes; moi.view.showAxisIcon = prev_showaxisicon; moi.view.showViewTitles = prev_showviewtitles; moi.view.viewportBackgroundColor = prev_background; var name = img.getSaveFileName(); if ( name != '' ) img.save( name );
- Michael
Show messages: All
1-7
8-12