Posts: 13
Registered: ‎05-17-2009
Message 1 of 2 (215 Views)
Accepted Solution

How to Get all opened documents(drawings)

215 Views, 1 Replies
05-28-2012 03:33 AM

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];


Valued Mentor
Posts: 359
Registered: ‎01-27-2010
Message 2 of 2 (207 Views)

Re: How to Get all opened documents(drawings)

05-28-2012 05:04 AM in reply to: vinayan
For Each element As Autodesk.AutoCAD.ApplicationServices.Document In Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
.. your code.


with this you have all open document 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community