Hi Scott, try the following put into a shortcut key:
script: /* save snapsnot to .3dm file */ var name = moi.geometryDatabase.currentFileName; if ( !name ) { moi.ui.alert( 'filename not set' ); } else { name = name.substr(0,name.length-4); var date = new Date(); name += (date.getMonth()+1) + '_' + date.getDate() + '_' + date.getFullYear() + '_' + date.getTime() + '.3dm'; moi.geometryDatabase.selectAll(); moi.geometryDatabase.fileExport( name ); moi.geometryDatabase.deselectAll(); }
One thing to look out for is you can't have a colon : character in a filename so don't try to format the date like that in the filename, that won't work.
moi.geometryDatabase.fileExport() also takes a second optional paramter for options but it's for controlling meshing options for export to a mesh format, not anything for .3dm format export.
- Michael
|