Author Topic: Visual Basic - accessing ArrayList issue  (Read 141 times)

PanWojtek

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Visual Basic - accessing ArrayList issue
« on: January 10, 2023, 08:15:43 pm »
Hello All,

I got issue when trying to create arrayList object (i got EA15)
dim myArrayList
set myArrayList = CreateObject( "System.Collections.ArrayList" )

program stops, and popup with empty message occurs.
(i cannot add attachment here)

on the other hand i had no issue with dictionary - and this code works:
dim efferentKPI
set efferentKPI = CreateObject( "Scripting.Dictionary" )

thanks for all suggestions



Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12254
  • Karma: +484/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Visual Basic - accessing ArrayList issue
« Reply #1 on: January 10, 2023, 08:22:59 pm »
You have to enable a .net framework component (v3.5 IIRC)

If you run a .vbs with this create statement, you'll get a dialog from windows asking you to add it.

Geert

PS. if you want to share an image, you can post it on a public image hosting site, and then share the link on this forum.

PanWojtek

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Visual Basic - accessing ArrayList issue
« Reply #2 on: January 10, 2023, 09:43:11 pm »
thanks for answer.

i tried to google how to install/enable .net for EA, but with no luck,

could you point me how to make it?


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12254
  • Karma: +484/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Visual Basic - accessing ArrayList issue
« Reply #3 on: January 10, 2023, 10:38:34 pm »
thanks for answer.

i tried to google how to install/enable .net for EA, but with no luck,

could you point me how to make it?
The problem has nothing to do with EA, but with the fact that the library that exposes the Arraylist object is not available on your machine.
You have to enable/install .Net Framework 3.5 to be able to use the ArrayList object.

https://social.technet.microsoft.com/Forums/en-US/264bb23a-c497-466a-aa21-03382031e821/windows-10-issue-with-vbscript-using-arraylist?forum=ITCG


Geert