1 Reply Latest reply on Dec 8, 2015 8:11 PM by kendall_hiles

    Add 3D View with automation, and remove it

    mark.postema

      We are using Visual Basic 2010 Express. I want to add/remove a 3D PCB View using automation???

       

      I can get the collection, and the views within it.

       

      Here is part of the code:

       

              Dim oPCBView As MGCPCB.Views

              oPCBViews = oPCBDoc.ViewsEx

              Console.Write(vbCrLf & vbCrLf & oPCBViews.Count & vbCrLf)

              For x As Integer = 1 To oPCBViews.Count

                  oPCBView = oPCBViews.Item(x)

                  oPCBView.Activate()

                  Console.Write(vbCrLf & oPCBView.Name)

                  Console.Write(vbCrLf & oPCBView.Type)

                  Console.Write(vbCrLf & oPCBView.OriginalName)

                  If oPCBView.Name.Contains("3D View") Then

                      oPCBView.Delete()

                  End If

              Next