katto01 Posted May 26, 2021 Share Posted May 26, 2021 Hello, Is there a way to get the names of all AutoCAD files open using VBA? Thank you Quote Link to comment Share on other sites More sharing options...
ammobake Posted May 26, 2021 Share Posted May 26, 2021 Hmmm. Is this for a network wide application across multiple users? Quote Link to comment Share on other sites More sharing options...
katto01 Posted May 26, 2021 Author Share Posted May 26, 2021 no just for the local machine Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 26, 2021 Share Posted May 26, 2021 Lisp version close for VBA (setq acDocs (vla-get-documents (vlax-get-acad-object))) (vlax-dump-object (vla-get-documents (vlax-get-acad-object))) ; IAcadDocuments: The collection of all AutoCAD drawings open in the current session ; Property values: ; Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff747b21e30> ; Count (RO) = 2 Quote Link to comment Share on other sites More sharing options...
katto01 Posted May 27, 2021 Author Share Posted May 27, 2021 thanks. sorry i need VBA. need to incorporate this into a larger VBA code Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 27, 2021 Share Posted May 27, 2021 Yeah understand but I dont work in VBA often, convert (setq acDocs (vla-get-documents (vlax-get-acad-object))) to VBA google etc Something like AcadApplication.Documents Quote Link to comment Share on other sites More sharing options...
PeterPan9720 Posted July 1, 2021 Share Posted July 1, 2021 (edited) Sub DocOpened() a = AcadApplication.Documents.Count b = AcadApplication.Documents.Item(1).Name c = AcadApplication.Documents.Item(2).Name d = AcadApplication.Documents.Item(3).Name End Sub Edited July 1, 2021 by PeterPan9720 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.