how to use new API, addParameterSelector() ?

how to use new API, addParameterSelector() ?

hello, Martin.

'addParameterSelector()', how to use it? I guess it is for adding selector UI to property or tool view.

regards.

Hiroto, tg_jp
 
Hi,
you have to use it like that.

Code:
obj.addParameterSelector("drink", ["Wine","Beer","Milk"],true,true);


That parameter is a integer parameter. So if you select "Milk" in the example above the return value will be 2.

Bye,
Martin
 
Hello, Martin.

thank you for replying. I use this for new one.

but, is there limitation of the number of elements? 6 works fine, but 7 or more might not work.

regards.

tg_jp, Hiroto
 
Hi,
yes there is indeed a limitation but it should be 9. But if there is really some need I could expand it.

Bye,
Martin
 
Martin,

is there some down side to adding more items? I have found some need to have more in some of my experimental scripts.

Thanks
Todd
 
Hi,
the downside is that the entries won't be ordered correctly. I would take some time to remove that limitation.

Do you need it for your let the sun in script. I found a quite long list of cites in that script. :wink:

Bye,
Martin
 
Martin,

actually no, that list of cites was just from where I got the javascript, see included websites. I have other scripts in the works and it would be useful but not nessassry for the scripts to function.


Todd
 
Last edited:
Back
Top