3 Replies Latest reply on Oct 3, 2017 12:10 PM by phiet

    Cell Editor Properties

    andrew.french

      Screen shot of the Cell Editor window and the Properties window of a specific cell from within Library Manager.  EE7.9.1

      8-31-2011 9-32-02 AM.png

      Through Automation I want to be able to change the "Verification Status."  I wrote the following code (C#) to try and find out more information on these properties but I'm not getting anything back so clearly I'm looking in the wrong place.  Any direction would be appreciated.

       

      private void setVerified()

      {

       

      //Create handle to the cell editor using the library specified in the global variables section

      CellEditorAddinLib.CellEditorDlg cellEd = new CellEditorAddinLib.CellEditorDlg();

      CellEditorAddinLib.CellDB cellDB = cellEd.OpenDatabase(lib, false);

       

      //Get the collection of partitions in the library and iterate through them

      CellEditorAddinLib.Partitions partitions = cellDB.get_Partitions();

       

      foreach (CellEditorAddinLib.Partition p in partitions)

      {

       

           //Get the collection of cells in the current partition and iterate through them

           CellEditorAddinLib.Cells cells = p.get_Cells();

       

           foreach (CellEditorAddinLib.Cell c in cells)

           {

                CellEditorAddinLib.CellProperties cellprops = c.Properties;

       

                foreach (CellEditorAddinLib.CellProperty cellprop in cellprops)

                {

       

                     MessageBox.Show(c.Name + " | " + cellprop.Name + " = " + cellprop.Value);

                }

           }

      }

      }

       

       

        • 1. Re: Cell Editor Properties
          jeremy_parker

          You don't have to loop through the properties to find or set that property.

           

          In the part where you are doing your cells loop, you need get the property there:

           

               foreach (CellEditorAddinLib.Cell c in cells)

               {

                    {

           

                          MessageBox.Show(c.Name + "  = " + c.verified);

                    }

               }

           

          To set it, you would either do:

           

          c.Verified = CellEditorAddinLib.ECellDBStatus.ecelldbStatusUnverified
          c.Verified = CellEditorAddinLib.ECellDBStatus.ecelldbStatusVerified
          
          

          or

           

          c.Verified = 1
          c.Verified = 0

           

           

          -J

          • 2. Re: Cell Editor Properties
            andrew.french

            yep, not surprising, I was assuming things were more difficult than they actually were once again.  Thanks!

            • 3. Re: Cell Editor Properties
              phiet

              Hi Jeremy,

              I tried this in Pads Pro vx2.2

              For each Partition in cellDB.Partitions

                  if Partition.Name = "smt_geom" then

                      MsgBox Partition.Name

                      For each Cell in Partition.Cells

                          if Cell.Name = "pci_express_x16_ab" then

                              MsgBox "Before " & Cell.Name & " " & Cell.Verified

                              If Cell.Verified  = 1 then

                              Cell.Verified = 0

                              Else

                              Cell.Verified = 1

                              End if

                              MsgBox "After " & Cell.Name & " " & Cell.Verified

                              cellDoc.Close(true)

                          end if

                      Next

                  End if

              Next

              cellDB.CloseActiveDatabase(true)

               

              it suppose to flip the value at each run.

              Before and after shows the value is flipped, if I rerun again it will be the same as if the Cell.Verified value is not save at exit.

              Is it because this .Verified is readonly in pads Pro ?