iLogic rule fails when trying to connect to a running instance of Inventor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
An ilogic rule is triggered by an ERP Configurator. An Inventor instance is already running as a process and it was launched by a processor before running the iLogic rule.
If I only use iLogic syntax (snippets) within the rule, it works very well. However, if I include API objects (methods and properties), it fails. It doesn't recognize the API objects. ilogic doesn't need to get the Application (ThisApplication or Inventor.Application), but API does. I'm using the following code to get the Application but it doesn't work:
' Connect to a running instance of Inventor.
Dim invApp As Inventor.Application
invApp = System.Runtime.InteropServices.Marshal.GetActiveObject ("Inventor.Application")
I've been trying to do simple things like displaying a message showing the ActiveDocument.DisplayName or ActiveDocument.FullFileName, but it doesn't work. Any idea how to connect to an existing Inventor instance from an iLogic rule? Thanks!