Typically: "How do I... ", "How can I... " questions
-
kat
- Posts: 13
- Joined: 02 Sep 2021, 15:50
Post
by kat »
Hello,
Sorry for the simple question but I've not been able to find how to do it.
Please is there a way to pass a value into the child script when running in headless mode?
Like this:
./coppeliaSim.sh -h -s myscene.ttt
<value to pass in>
Code: Select all
function coroutineMain()
X= <value passed>
print(X)
end
So that I can run the same scene with different values without editing the child script?
Best,
Kat
-
coppelia
- Site Admin
- Posts: 10362
- Joined: 14 Dec 2012, 00:25
Post
by coppelia »
Hello Kat,
yes, you can do this with named parameters and the
command-line option -G, e.g.
Then you can retrieve the value with sim.getStringNamedParam / sim.getNamedStringParam
Cheers
-
kat
- Posts: 13
- Joined: 02 Sep 2021, 15:50
Post
by kat »
Thank you, that's just what I was after!