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

Hi Justin,

Thanks for your reply! iLogic rule is run from an external application that loaded the iLogic dlls (Autodesk.iLogic.Automation.dll and Autodesk.iLogic.Interfaces.dll). Let's say this code executes an iLogic rule named "Configure", then it starts my ilogic rule, makes the changes and it's done. If I only use iLogic syntax (snippets) is fine, but when I combine these iLogic syntax with API objects within the same iLoigc rule, it fails. If I manually open Inventor and run the iLogic rule "Configure" from the Inventor session that I manually opened, it works well with both iLogic syntax and API objects as long as I used 'ThisApplication' to get the API objects. However, in the real scenario, I'm not opening Inventor manually, Inventor is already open by an external processor and I need to connect to that existing/running instance of Inventor. Then, in my code I won't use 'ThisApplication', because I didn't launch it (it's already running). I should use System.Runtime.InteropServices.Marshal.GetActiveObject ("Inventor.Application") but it doesn't work.

I hope I explained my situation better.

 

Any idea? Thanks!