Sub Example_ActivateMethod() ' This example creates two new drawings adds them to the Documents collection ' it then steps through the Documents collection and activates each drawing in turn. Dim dwg1 As AcadDocument: Set dwg1 = ThisDrawing.Application.Documents.Add("") Dim dwg2 As AcadDocument: Set dwg2 = ThisDrawing.Application.Documents.Add("") Dim theDwg As AcadDocument For Each theDwg In ThisDrawing.Application.Documents theDwg.Activate MsgBox "Drawing " & theDwg.Name & " is active." Next theDwg End Sub
© Bricsys NV. All rights reserved. |