iLogic Parameter Multi-Value sorted list

iLogic Parameter Multi-Value sorted list

hperison
Contributor Contributor
876 Views
4 Replies
Message 1 of 5

iLogic Parameter Multi-Value sorted list

hperison
Contributor
Contributor

I have been attempting to have a sorted list within my User Parameters

image.png or image.png.  However, every method that I have tries so far becomes

a jumbled mess as shown.  How can I have this multi-value lists display in the proper logical order (smallest to largest).

0 Likes
877 Views
4 Replies
Replies (4)
Message 2 of 5

hperison
Contributor
Contributor

Add Numeric Multi-Value list worked. I thought that the value listed as a Fraction would have been a string value, but it worked in a numeric list.

0 Likes
Message 3 of 5

hperison
Contributor
Contributor

After some further testing, I find that this method is a little closer to being correct but not quite.

image.png.  Any suggestions to achieving the correct result or nobody really worried about this in their customization routines?

0 Likes
Message 4 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support

@hperison,

 

Hoping that below iLogic code may be helpful.

 

Dim arr As ArrayList 
arr = MultiValue.List("Name of multivalue parameter")
arr.Sort()

MultiValue.List("Name of multivalue parameter") =  arr

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 5 of 5

rob
Advocate
Advocate

Yep, that helped me out, thanks!

IV Pro 2020.2
0 Likes