Save as with screen shot

 From:  shayno
6249.1 
Hi Michael

I have been using your script in save.js to save a screenshot

I can't work it out so it works in save as , although I often save an stl output in a different folder to where the 3dm drawing is stored.
Could it be saving the jpg in the 3dm folder

my save as file

// config: norepeat

moi.geometryDatabase.saveAs( moi.command.getCommandLineParams() );

script:var img = moi.view.screenshot( 'viewpanel', false ); var filename = moi.geometryDatabase.currentFileName; if ( filename != '' ) { img.save( filename.substring(0,filename.length-3) + 'jpg' ); }

thanks
shayne