Hello,
Doing some exercise
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication
app = **uiapp**.Application
OUT = [doc,**uiapp**,app]
I want just get my current document, but for any reason, i can’t get it.
Are there prinziples f.e. Can I say that:
1.) I need a current document
2.) I need tools for transaction
3.) Do something (f.e. with elements… for…loop)
4.) Close the task
doc = DocumentManager.Instance.CurrentDBDocument
elements = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
for e in elements:
doc.Delete(e.Id)
TransactionManager.Instance.TransactionTaskDone()
OUT = "terminated!"
KR
Andreas
GetCurrentDoc.dyn (3.9 KB)