Page 1 of 1

Specify File-Path In MAC version of V-rep

Posted: 01 Jun 2014, 14:11
by adityaraj52
Hello,

I would like to know how to specify the file path to open via child script. In windows, if I copy pasted the file in the default installation path (C:/Programfiles(x86)/V-rep), it worked fine. But now when I want to open and read a file using v-rep child script where should I place it or do I need to modify the lua code.

The code that worked on windows to access a file in childscript was:

my_arr=openFile('models\floorSize.txt')

Now, if I want to access same file, where should i place in Applications/V-REP_PRO_EDU_V3_1_1_Mac.

With regards,

Re: Specify File-Path In MAC version of V-rep

Posted: 01 Jun 2014, 17:01
by coppelia
Hello,

on Mac, the V-REP executable is located inside of the vrep.app package, more precisely in the vrep.app/Contents/MacOS/ folder, which is also the application default folder. So normally everything is relative to that folder. If you wish to open a myModel.ttm file located in a models folder that is at the same location as vrep.app, you should use:

Code: Select all

'../../models/myModel.ttm'
Cheers