Specify File-Path In MAC version of V-rep

Typically: "How do I... ", "How can I... " questions
Post Reply
adityaraj52
Posts: 11
Joined: 19 Jun 2013, 14:29

Specify File-Path In MAC version of V-rep

Post 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,

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

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

Post 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

Post Reply