Page 1 of 1

Missing user parameters icon for child scripts

Posted: 13 Dec 2019, 11:44
by bknight-i3drobotics
I recently updated to the new coppeliaSim. Since the update, I have been unable to see user parameter icon for models/objects when adding new scripts. In previous versions when a script was added the icon appeared along with the script. Previously created scenes with scripts have the icon visible. This issue comes when I add a new script to an object.
How do I open this dialogue without the icon? http://www.coppeliarobotics.com/helpFil ... meters.htm
Or rather how do I make this icon appear? Image

Re: Missing user parameters icon for child scripts

Posted: 16 Dec 2019, 01:13
by coppelia
Hello,

just type

Code: Select all

sim.setUserParameter(objectHandle,'@enable','')
in the Lua commander.

Cheers

Re: Missing user parameters icon for child scripts

Posted: 16 Dec 2019, 11:05
by bknight-i3drobotics
Perfect, thanks!

Would be nice if there was a UI way of enabling this like a tick box in the object properties. I will post this to feature requests.

Re: Missing user parameters icon for child scripts

Posted: 16 Dec 2019, 11:09
by bknight-i3drobotics
Also is there a way to disable it again?

I have tried:

Code: Select all

sim.setUserParameter(objectHandle,'@disable','')
But this didn't work.

Re: Missing user parameters icon for child scripts

Posted: 18 Dec 2019, 22:49
by coppelia
To disable it, simply double-click the icon and remove all parameters.

Cheers

Re: Missing user parameters icon for child scripts

Posted: 27 May 2020, 19:48
by Shaoxiang Wang
Did you solve the problem?

The command sim.setUserParameter(objectHandle,'@enable','') doesn't work.

Re: Missing user parameters icon for child scripts

Posted: 29 May 2020, 06:00
by coppelia
It should work. Just make sure that you have a child script or customization script attached to the same object.

Cheers

Re: Missing user parameters icon for child scripts

Posted: 29 May 2020, 06:43
by FirdausAman
The command doesn't work. Here is my output after inserted the command:

> sim.setUserParameter(objectHandle,'@enable','')
[string "SANDBOX SCRIPT"]:1: One of the function's argument type is not correct. (sim.setUserParameter)

Re: Missing user parameters icon for child scripts

Posted: 29 May 2020, 06:59
by coppelia
??
Did you really use objectHandle litterally? You need to replace that with the handle of the object you want to enable that feature! So if your object's name is myJoint, you'd do:

Code: Select all

objectHandle=sim.getObjectHandle('myJoint')
sim.setUserParameter(objectHandle,'@enable','')
Cheers

Re: Missing user parameters icon for child scripts

Posted: 30 May 2020, 04:53
by FirdausAman
Nice! Thank you!