Script request
All  1-9  10-12

Previous
Next
 From:  shayno
11746.10 In reply to 11746.9 
Thanks Michael

it errors

ReferenceError: Can't find variable: basename

line 1

1: >> var folder = 'D:\\To Print Morris and Watson\\'; var filename = moi.geometryDatabase.currentFileName; if ( filename ) { var index = filename.lastIndexOf( '.' ); if ( index != -1 ) { filename = filename.substr( 0, index ) + '.stl'; filename = folder + moi.filesystem.getFileNameFromPath( filename ); moi.geometryDatabase.saveAs( filename, 'NoUI=true;Angle=3' ); moi.copyTextToClipboard( moi.filesystem.getFileNameFromPath(basename) ); } }

If its too hard to do don't spend any time on it
cheers
shayne
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11746.11 In reply to 11746.10 
Hi shayne,

re:
> it errors
>
> ReferenceError: Can't find variable: basename

It looks like you only copied the last piece of the above script?

You are missing this part in the new version above:

script: var folder = 'c:\\scripts\\'; var filename = moi.geometryDatabase.currentFileName; if ( filename ) { var index = filename.lastIndexOf( '.' ); if ( index != -1 ) { var basename = filename.substr( 0, index ); filename = basename + '.stl'; filename = folder + moi.filesystem.getFileNameFromPath( filename ); moi.geometryDatabase.saveAs( filename, 'NoUI=true;Angle=3' ); moi.copyTextToClipboard( moi.filesystem.getFileNameFromPath(basename) ); } }

Try copying the entire script from above not just the ending part.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  shayno
11746.12 
Works perfect thanks shayne
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-9  10-12