Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IFRs on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing an Array in VB

Status
Not open for further replies.

Twullf

Mechanical
Jan 24, 2012
196
thread561-242107

I have checked the above thread and I know my problem is the same but have not been able to find a solution.

My array size is being set as the user selects a number a faces in the following command.

Code:
Dim loftFace() As Face = select_faces("Select surface mold is being checked against.")

Then I wish to use the selected faces in the a subroutine calling it thus:

Code:
PlaceIntersection( loftFace(), dPStation, loftInterLine )

the Subroutine is titled as following:
Code:
Sub PlaceIntersection( ByRef checkFace(-1) As Face, ByRef dPStation As DatumPlane, _
      ByRef InterLine As Features.IntersectionCurve )

but during compilation, I am getting the error of: "Number of indicies is less than the number of dimensions of the indexed array."
as well as "Array bounds cannot appear in type specifiers"

I wish the array to be dynamic, but I'm not sure how to pass the array afterwards.

Any help would be greatly appreciated.

 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor