CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 3194 

CAD tip CAD tip # 11801:

Question CAD 
 %  platform  category 
Q - question

What is the difference between ThisDoc.Document and ThisApplication.ActiveDocument in iLogic?

A - answer 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    1494×  
Comments   Tell a friend
applies to: Inventor ·

See also:
Tip 11983:How to use iLogic code to fill username into iProperties?
Tip 11732:How to sort BOM or parts list by part number in Inventor? (iLogic)
Tip 11542:How to reset the top browser node name back to the file name?
Tip 11211:Mass change of units in the whole Inventor assembly.
Tip 11111:Inventor drawing diplays flipped, mirrored (as from underside)


Back   All CAD Tips All CAD tips&tricks

Higher precision for facetted round surfaces in STL export from Inventor. « | » Undocumented code in field expression - MText contents without control characters.

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 glossary   



Featuring:
Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info


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