Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
meck
523 Views, 2 Replies

Ilogic sub-routine argument limit?

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
ckeveryga
in reply to: meck

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. 

meck
in reply to: meck

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