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..I have this question on Autodesk Forum too..but not sure how much active it is :)
public void GetDocNames()
{
DocumentCollection docs = Application.DocumentManager;
for (int i = 0; i < docs.Count; i++)
{
AcadDocument doc = docs[i];
Debug.Print(doc.Name);
}
}
You have tagged both C# and VB.NET. The C# version is as follows:
public void GetDocNames()
{
DocumentCollection docs = Application.DocumentManager;
foreach (Document doc in docs)
{
Application.ShowAlertDialog(doc.Name);
}
}