Ilogic sub-routine argument limit?

Ilogic sub-routine argument limit?

meck
Collaborator Collaborator
560 Views
2 Replies
Message 1 of 3

Ilogic sub-routine argument limit?

meck
Collaborator
Collaborator

I have an ilogic sub-routine that I want to pass 6 arguments to, but I keep getting this error...

Rule Compile Errors in Ground Bus, in _General Assembly.iam

Error on Line 73 : Argument not specified for parameter 'DesPlanes' of 'Public Sub Install(PartNo As String, ConstraintTypes As String, ConstraintOffsets As String, ConstraintPlanes As String, ConstrainTo As String, DesPlanes As String)'.

If I remove the last argument from both the call and the sub I do not get an error.

Here are my call statement and the sub-routine's receiving line...

Call Install(NewAssyNo, "Flush|Mate|Flush", Pos, "XZ Plane|YZ Plane|XY Plane", HousingOccurNo, DesPlanes)

Sub Install(PartNo As String, ConstraintTypes As String, ConstraintOffsets As String, ConstraintPlanes As String, ConstrainTo As String, DesPlanes As String)

Does iLogic limit the number of arguments that can be passed to 5, or what stupid thing am I missing?

Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes
Accepted solutions (1)
561 Views
2 Replies
Replies (2)
Message 2 of 3

ckeveryga
Advocate
Advocate
Accepted solution

There is no limit, as I was able to call a subroutine with 6 arguments with no problem. The issue is that you are not passing a string to DesPlanes on line 73. Double check that the string is defined and is being passed to the sub routine in every instance. You can test that it works by adding "TestString" where DesPlanes should be. 

0 Likes
Message 3 of 3

meck
Collaborator
Collaborator

Thanks for the response!

You were correct! It did not recognize the variable DesPlanes as a string. All I had to do to fix it was to add this... Dim DesPlanes as String.

 

Serves me right for trying to cut corners.

 

By best to you and stay healthy!

Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018