CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
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.
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 11801:

Question

CAD 
 %  platform  category 
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
100% *CAD
19.2.2018    16239×  
applies to: Inventor ·

See also:
Tip 14611:Contribution of individual features to the total mass of an Inventor part (iLogic).
Tip 14527:Search/Replace texts in Inventor drawings - iLogic.
Tip 14200:How can I use multiple title blocks in an Inventor drawing?
Tip 13965:Total length of sweeps in Inventor - wires, pipes, trusses, tubes, hoses (iLogic)
Tip 13963:Sum of pipe element lengths in Inventor (iLogic).


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Simply link AutoCAD LT blocks to Excel table data.
Excellink LT 2006 More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist