katto01 Posted May 26, 2021 Posted May 26, 2021 Hello, Is there a way to get the names of all AutoCAD files open using VBA? Thank you Quote
ammobake Posted May 26, 2021 Posted May 26, 2021 Hmmm. Is this for a network wide application across multiple users? Quote
BIGAL Posted May 26, 2021 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
katto01 Posted May 27, 2021 Author Posted May 27, 2021 thanks. sorry i need VBA. need to incorporate this into a larger VBA code Quote
BIGAL Posted May 27, 2021 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
PeterPan9720 Posted July 1, 2021 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
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.