Page 1 of 1

Api costants in matlab

Posted: 18 Jan 2021, 13:47
by ichronopoulos
Hi!
I am trying to use functions like sim. simxSetBooleanParameter in matlab. Those functions require api constants like sim.boolparam_dynamics_handling_enabled as an input.
However, always an error occurs. I tried sim_boolparam_dynamics_handling_enabled but i got the same result.
How can i use api constants in remoteApi properly?
Thanks in advance!

Re: Api costants in matlab

Posted: 19 Jan 2021, 11:36
by coppelia
Hello,

are you using the legacy remote API or the B0-based remote API?

Also, what kind of error happens? I.e. what is the message output, and what is the return value of the function you call?

Cheers

Re: Api costants in matlab

Posted: 19 Jan 2021, 13:07
by ichronopoulos
Hi and thanks for your reply!
I use the legacy remote Api .
Here is the error i get:
No appropriate method, property, or field 'simx_boolparam_dynamics_handling_enabled' for class 'remApi' or
No appropriate method, property, or field 'simx.boolparam_dynamics_handling_enabled' for class 'remApi' .
Function does not returns an error, as it is not executed properly..
My command: [errorCode]=sim.simxSetBooleanParameter(clientID,sim.simx_boolparam_dynamics_handling_enabled,false,sim.simx_opmode_oneshot).

What should i do?

Re: Api costants in matlab

Posted: 19 Jan 2021, 13:57
by coppelia
sim_boolparam_dynamics_handling_enabled is defined as value 6, in remApi.m. So type sim.sim_boolparam_dynamics_handling_enabled instead of sim.simx_boolparam_dynamics_handling_enabled. You can also directly use the value 6.

Cheers

Re: Api costants in matlab

Posted: 20 Jan 2021, 09:40
by ichronopoulos
It works!
Really helpful, thanks a lot!