VBA app to run across currently opened dwgs

VBA app to run across currently opened dwgs

mdhutchinson
Advisor Advisor
282 Views
1 Reply
Message 1 of 2

VBA app to run across currently opened dwgs

mdhutchinson
Advisor
Advisor
I am new to VBA but have done lots of Visual lisp.

Is is possible to write a VBA application that will run across currently opened drawings? Could someone refer me to an example I might get me started?
0 Likes
283 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
from help file:

Sub Example_Documents()
' This example obtains a reference to the Documents collection
' and displays information about the loaded documents.

Dim Document As AcadDocument
Dim msg As String
msg = vbCrLf

' Cycle through the Documents collection and retrieve the names
' of the loaded documents
For Each Document In Documents
msg = msg & Document.name & vbCrLf
Next

' Display loaded document information
If Documents.count > 0 Then
MsgBox "The loaded documents are: " & msg
Else
MsgBox "There are no loaded documents!"
End If
End Sub
0 Likes