AnsweredAssumed Answered

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

Question asked by jtaschereau on May 9, 2012
Latest reply on May 10, 2012 by Andreas.Schaefer

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()

Outcomes