Missing user parameters icon for child scripts

Report crashes, strange behaviour, or apparent bugs
Post Reply
bknight-i3drobotics
Posts: 4
Joined: 12 Dec 2019, 17:06

Missing user parameters icon for child scripts

Post 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

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

Re: Missing user parameters icon for child scripts

Post by coppelia »

Hello,

just type

Code: Select all

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

Cheers

bknight-i3drobotics
Posts: 4
Joined: 12 Dec 2019, 17:06

Re: Missing user parameters icon for child scripts

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

bknight-i3drobotics
Posts: 4
Joined: 12 Dec 2019, 17:06

Re: Missing user parameters icon for child scripts

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

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

Re: Missing user parameters icon for child scripts

Post by coppelia »

To disable it, simply double-click the icon and remove all parameters.

Cheers

Shaoxiang Wang
Posts: 18
Joined: 23 May 2020, 15:39

Re: Missing user parameters icon for child scripts

Post by Shaoxiang Wang »

Did you solve the problem?

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

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

Re: Missing user parameters icon for child scripts

Post by coppelia »

It should work. Just make sure that you have a child script or customization script attached to the same object.

Cheers

FirdausAman
Posts: 2
Joined: 28 May 2020, 07:23

Re: Missing user parameters icon for child scripts

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

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

Re: Missing user parameters icon for child scripts

Post 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

FirdausAman
Posts: 2
Joined: 28 May 2020, 07:23

Re: Missing user parameters icon for child scripts

Post by FirdausAman »

Nice! Thank you!

Post Reply