Community
I am using AutoCAD 2012 and the .NET API. Can someone help me how can i loop through the document objects of all the open documents? i am trying to do something like the code below..
public void GetDocNames() { DocumentCollection docs = Application.DocumentManager; for (int i = 0; i < docs.Count; i++) { AcadDocument doc = docs[i]; Debug.Print(doc.Name); } }
Solved! Go to Solution.
Solved by AubelecBE. Go to Solution.
For Each element As Autodesk.AutoCAD.ApplicationServices.Document In Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager .. your code. Next
with this you have all open document