File path on a Mac

Next
 From:  shane (SHANE_W)
5388.1 
I am trying to export a .obj using a hot key in the OS X version and have run into a snag. I am not sure how to write the file path.

This is what I have so far.

script:moi.geometryDatabase.fileExport( 'user/me/desktop/test.obj' );

It gets to the meshing stage but doesn't save the file. I think is has something to do with the file path I am using. Any help would be appreciated.

-Shane
  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
5388.2 In reply to 5388.1 
Hi Shane, an absolute file path on the Mac should start with the / character, and also the regular directory for users is named 'Users', not just 'user' like you've written there.

So for instance on my machine where my user name is michael to write a file to my user directory would look like this:

script:moi.geometryDatabase.fileExport( '/Users/michael/test.obj' );


The fileExport() method will write just the selected objects to the file so you will need to make sure you have a selection first before calling that.

If you want to write out everything regardless of selection then use the saveAs method instead, like: moi.geometryDatabase.saveAs( '/Users/michael/test.obj' );

Hope this helps!

- 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
Next
 From:  shane (SHANE_W)
5388.3 In reply to 5388.2 
Perfect! Silly "s" who knew computers were so picky?

As always, thanks for the awesome support 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:  Michael Gibson
5388.4 In reply to 5388.3 
No problem shane!

- 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
 

Reply to All Reply to All