8 Replies Latest reply on May 12, 2015 11:39 PM by olsmir

    Cannot re-assign Plane Class to Plane Shape using Automation

    olsmir

      Hello All,

       

      I need to reset the OVERRIDE status from all Plane Shapes having such status on PCB. For this, I simply re-assign the original Plane Class to such Plane Shapes:

       

      For Each shapeObj In doc.PlaneShapes

          If (shapeObj.PlaneClass.HasOverrides) Then

             For Each classObj In doc.PlaneClasses

                 If (classObj.Name = shapeObj.PlaneClass.Name) Then

                    shapeObj.PlaneClass = classObj 'The surprising error "Object doesn't support this property or method: shapeObj.PlaneClass"

                    Exit For

                 End If

             Next

          End If

      Next

       

      However, according to documentation, shapeObj.PlaneClass has  Read/Write access.

      Can anybody explain me, What am I doing wrong?

       

      Regards,

      Oleg