How can I create an dynamic array in URSCRIPT or is it possible to create?

i=1251
a[i]
j=0
while j<1251:
a[j]=j
j=j+1
end

2 Likes

Frustratingly, creation of an empty array of a given size is not functionality that is natively available in polyscope. Fortunately, there has been a workaround posted as part of this thread. It requires a setting up an XML-RPC call that returns an array of the required size. I put together a feature requrest about gett better array functionality natively in polyscope a while ago, if you could drop a like there to get it more attention it would be appreaciated.

Hope this helps.

2 Likes

Thank you Sam for your kind interest.

We have a script file that allows you to dynamically build an array of a given size up to around 250 elements. It also allows you to prefill the elements with a value so you can create Boolean, number or pose arrays.

We used a JavaScript program to create the file. It’s a silly workaround but it works and it doesn’t add much overhead to the program. You can find the script file in the thread mentioned above.

We also have the ability to return an array via XMLRPC.

Thank you mbush I will search about XMLRPC most of the keywords for dynamic array is releated with it

Will this functionality come with an update in the future?

I do hope so, until then all you can do is like the feature requiest post to help show that its functionality that people want.

1 Like