I have a rule which contains the Main and three Subs. I need to transfer variables between Subs. Normal VB doesn't seem to work. It doesn't error out. It just doesn't do it.
For example, I call a Sub from Main :
SwapPipe (oCompOcc, CurrentSize, NozzleSize)
The Sub beginning looks like :
Sub SwapPipe(compOcc as Inventor.ComponentOccurrence, CurrentSize As String, NozzleSize As String)
Then that Sub calls another Sub as:
And that Sub beginning looks like:
Sub InitialSize(ScompOcc as Inventor.ComponentOccurrence, CurrentSize As String)
So, as an example, I would think that the variable CurrentSize would transfer between all these. But it isn't.
Any help is greatly appreciated.
That should work. What version of Inventor are you using?
You can try adding the line:
Option Explicit On
Option Strict On
to the top of your rule. That might give you some compiler error messages about undeclared variables.
Inventor 2011 64bit.
OS = Windows 7.
I agree it should work but there are lots of things I've found in iLogic that you can do in Dot Net but not in iLogic.
But variable transfer is simple and I just can't understand why it won't do it.
Ok, good. I'm using it in my current program.
Basically I have a 150# nozzle which consists of a 150# flange and a pipe. Both are Content Center parts. I can swap the flange out without issue but I'm having difficulty with the pipe. How do I put that in the replacer command so that Content Center knows to ONLY replace the size and leave the schedule and length alone?
Then, secondary to that, how do I put that in the replacer command so that I can change any of those?