3 Replies Latest reply on May 30, 2010 10:49 AM by Head1

    Small  bug .

    Head1

      Hello everybody,

       

      I try to run this little script, but get an error:

          "Incorrect cell for this call. Check the type before making this call."

       

      ===========================================================

      ' Print all Cells which are of type  BGA

      '

      Dim All_Cells
      Dim Curr_Cell

       

        Set All_Cells = DocObj.Cells
       
           For Each Curr_Cell In All_Cells
               If (Curr_Cell.PackageGroup) = epcbPackageBGA Then print #1,curr_cell.name
           Next

      ======================================================================================
          

      Thanks to all experts.

       

                   Head1

       

        • 1. Re: Small  bug .
          Andreas.Schaefer

          Hi,

          seems to be a basic mistake.

           

          The celss collection consitst of all cells (Package Cells, Mechanical Cells, Drawing Cells).

          So what do you expect to get by the call of Curr_Cell.PackageGroup , if you Curr_Cell is a mechanical/drawing one?

           

          You should first filter the Curr_Cell for the package cells with the "CellType" property.

           

          regards,

          Andreas

          • 2. Re: Small  bug .
            Head1

            Hello Andreas,

             

              Thanks for your answer.

             

              Of course I had a basic mistake, beause I am still a rookie in Automation.

              I will check it soon.

             

                      Danke,

                           Head1.

            ----------------------------------------------------------

            • 3. Re: Small  bug .
              Head1
              Hello Andreas,
                 Thanks for you advice from 25.5.2010.
                  I have checked it. It  really works.
                       Best regards,
                        Head1
              -------------------------------------------------------