Documents property example

 

Sub Documents_Example()

' This example obtains a reference to the Documents collection

' and displays information about the loaded documents.

    Dim thisDocument As AcadDocument

    Dim allDocuments As AcadDocuments

    Set allDocuments = ThisDrawing.Application.Documents

    Dim sBuf As String: sBuf = vbCrLf

    For Each thisDocument In allDocuments

        sBuf = sBuf & thisDocument.Name & vbCrLf

    Next

    If allDocuments.count > 0 Then

        MsgBox "The loaded documents are: " & sBuf

    Else

        MsgBox "There are no loaded documents!"

    End If

End Sub

 


Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved.