1 Reply Latest reply on May 10, 2012 12:44 AM by Andreas.Schaefer

    PutObstruct Method: Object doesn't support this property or method

    jtaschereau

      I'm trying to place an array of route obstructs using the code below. But for some reason, I keep getting an "Object doesn't support this property or method" error and no obstructs are placed. Can anyone spot the reason why?

       

      On Error Resume Next

      'Lower-left quadrant

      pcbDoc.TransactionStart(1)

      Ycoord = 0

      Do While Ycoord > Ymin

           Xcoord = 0

           Do While Xcoord > Xmin

                err.clear

                pntsArr = pcbApp.Utility.CreateCircleXYR(Xcoord,Ycoord,185)

                numPoints = UBound(pntsArr)

                dFile.WriteLine(numPoints)

                Set rtnVal = pcbDoc.PutObstruct(1,0,numPoints,pntsArr,16,False,nothingObj,curUnits)

                If Err Then

                     dFile.WriteLine(Err.ErrorString & " @ " & Xcoord & "," & Ycoord)

                     dFile.WriteLine(Err.Description & " @ " & Xcoord & "," & Ycoord)

                End If

                Xcoord = Xcoord - pitch

           Loop

           Ycoord = Ycoord - pitch

      Loop

      pcbDoc.TransactionEnd()