I am fairly new to VB and C# so bear with me. I am trying to set up a script to remove one surface at a time from a list of surfaces until the total area of all of them is smaller than a max area I have set up. I'm trying to randomize the removal of surfaces so I made a random list of numbers from 0 to the number of total surfaces there are and want the script to pull numbers one at a time that correspond to the surfaces. Attached are the files that I'm currently working on if this is confusing. This is the only code I have so far
Dim randomList As New ArrayList
Dim myFloors As New ArrayList
Dim sortedAreas As New ArrayList
Dim tempArea As New Double
randomList.Add("random_list")
myFloors.Add("floors")
sortedAreas.Add("sorted_areas")
If max_area > current_area Then
myFloors.RemoveAt(randomList(0))
tempArea = current_area - sortedAreas(0)
If max_area > tempArea Then
myFloors.RemoveAt(randomList(1))
End If
Else
Return
End If
Hopefully from the files you can see what I'm trying to do, but if not I can clarify as best I can. Thanks for any help!