Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

Cannot re-assign Plane Class to Plane Shape using Automation

$
0
0

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


Viewing all articles
Browse latest Browse all 4541

Trending Articles