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

I did, but I can't seem to get the right stuff together to make it work.

 

It is with the ISharedVariable interface. In the Object Browser is mentioned that, in a rule, this interface is implemented by the predefined object named SharedVariable. That's also how I use it in regular iLogic-rules. In Jelte's blog is mentioned that the AbstractRule-class currently contains 2 properties.

So I tried to add "Public Property SharedVariable As ISharedVariable" and in another attempt "Public SharedVariable As ISharedVariable" 

 

But I keep getting te error "Object reference not set to an instance of an object." when running something simple as this:

Try
    SharedVariable.Value("TestVariable") = "TestValue"
Catch ex As Exception
    MessageBox.Show(ex.Message, "Attempt to create SharedVariable 'TestVariable' with value 'TestValue'")
End Try

Could makes sense, because I don't do anything with the previously declared and assigned iLogicAutomation object.

 

As an alternative I now try to just notice the events and then trigger an external rule. I don't know yet if this will work. iLogic is only available from the Inventor interface when/after opening a document. For that reason I also check if the Automation is activated. Otherwise .activate()

 

Things remain confusing and I'm afraid I'm on the wrong track.

Btw, I run Inventor 2023.5.1

René van der Starre