AnsweredAssumed Answered

Cannot re-assign Plane Class to Plane Shape using Automation

Question asked by olsmir on May 8, 2015
Latest reply on May 12, 2015 by 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

Outcomes