title: Catia VBA to .CATScript for type "Collection"
body: <p>In my VBA code i'm using the following:</p>
  
  <pre><code>Dim docsToSave As Scripting.Dictionary
  Set docsToSave = New Scripting.Dictionary
  
  Dim toRemove As Collection
  Set toRemove = New Collection
  
  ...
  More Code
  ...
  
  For i = 1 To toRemove.Count
      docsToSave.Remove (toRemove.Item(i))
  Next
  </code></pre>
  
  <p>The nice thing about Collections compared to Dictionaries is that you can retrieve keys by using their item numbers.<br>
  My problem is that I need to convert my VBA-code to CATScript (similar to VBScript).<br>
  I don't think it's easy to get a code as simple as the above for subtracting one list of "key, item" from another list.<br>
  What's the best way to fix my code so that it works in CAT/VB-Script?<br>
  I believe it may be possible with an Array, since I'm very new at coding in general I figured I'd ask here first for a better way before I try to make it work with Arrays.</p>
  
  <p>Edit:<br>
  This question differs from <a href="https://stackoverflow.com/questions/48264708/catia-vba-enable-use-of-scripting-dictionary-in-catscript">CATIA VBA Enable use of “Scripting.Dictionary” in .CATScript</a> because this question specifically requests information on how to use a dictionary in VBScript so that it would replicate the behaviour of a Collection used in an existing VBA-script.</p>