Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: darren.lees

Hi @darren.lees.  When you declare an Array type variable, it can be tricky.  You either have to not specify the size/length of the array, then set all of its contents at that line of code, or you must specify its size/length, then not specify its contents at that line of code, then fill in its contents later, being careful not to go pas that pre-set size.  It is often easier to create a 'New List(Of String)' when you do not know how many entries you may need to put into it.  Then just use its Add or AddRange method to add its contents.  Its size/length does not matter, plus a List is super easy to 'Sort' later.  If you need to specify size, you may be able to use 'oPartList.PartsListRows.Count - 1', because Arrays are zero based (zero is its first entry index).

Wesley Crihfield

EESignature

(Not an Autodesk Employee)