.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Get all opened documents(drawings)

1 REPLY 1
SOLVED
Reply
Message 1 of 2
vinayan
661 Views, 1 Reply

How to Get all opened documents(drawings)

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);
            }
        }

 

Tags (2)
1 REPLY 1
Message 2 of 2
AubelecBE
in reply to: vinayan

For Each element As Autodesk.AutoCAD.ApplicationServices.Document In Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
            
.. your code.
        Next

 

with this you have all open document 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost