Community
In AutoCAD.NET API, please tell me.
From DocumentManager, I want to acquire Document Object by a drawing file name.
Please tell me the method.
Solved! Go to Solution.
Solved by Hallex. Go to Solution.
Think you need all documents what is already opened
then you can try this code
<CommandMethod("tfl")> _ Public Sub testDrawings() Dim dm As DocumentCollection = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager Dim doc As Document = dm.GetDocument(HostApplicationServices.WorkingDatabase) Dim ed As Editor = doc.Editor ed.WriteMessage(vbLf + "Current Document: {0}", doc.Name) Dim ienum As IEnumerator = dm.GetEnumerator While ienum.MoveNext Dim idoc As Document = DirectCast(ienum.Current, Document) ed.WriteMessage(vbLf + " Document item in collection: {0}", idoc.Name) End While End Sub
Dear Mr. Hallex
Thank you for immediate advice.
It was saved very much.Yours sincerely,
NKCAUTOCAD01 (M.Tsukamoto).
You're welcome, M.Tsukamoto
Keep coding,
Cheers