Over 1.096.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips.
Try the new precise Engineering calculator.
New AutoCAD 2026 commands and variables.
CAD tip # 11801:
Question
A
When coding a rule (macro) in iLogic, the active document in Inventor can be referred in two main ways - ThisDoc.Document and ThisApplication.ActiveDocument.
How do they differ and which one to prefer? The object reference ThisDoc.Document may slightly differ from ThisApplication.ActiveDocument in the iLogic environment - so it may refer a different document (e.g. an IPT part). The object "ThisDoc" always points to the document containing the current iLogic rule, while the object "ActiveDocument" is the currently active document in terms of the Inventor application - it is not necessarily the same document as the document containing the running ilogic rule. For consistency of proper context in your iLogic code always prefer the reference ThisDoc.Document.
Inventor


19.2.2018
16239×
applies to: Inventor ·