It's one of those days...
Dim lAlignCount as Long Dim lProjectID as Long Dim lHorizAlignIDs() as Long 'Array of Longs 'Get number of horizontal alignments for a given project lAlignCount = scadSDK_cogoCountNumberOfHorizontals(ProjectID) 'Resize the array of Longs to be equal to the number of alignments. Zero based, hence the -1 ReDim lHorizAlignIDs(lAlignCount - 1) 'The InRoads DLL will populate your array of Longs with the ID's scadSDK_cogoGetHorizontalAlignments lHorizAlignIDs(0), lAlignCount, lProjectID