2 Replies Latest reply on Jun 16, 2011 8:16 AM by andrew_french

    Cell Editor Automation


      I'm programming in C#.net and we are on EE7.9.1 update1.


      From Library Manager the librarian has opened a specific cell in the Cell Editor, its the window that looks similar to Expedition.  I want to write a script that will interact with this window, how do I get a handle to it?


      I thought this would work:

      CellEditorAddinLib.CellEditorDlg cellEd = (CellEditorAddinLib.CellEditorDlg)System.Runtime.InteropServices.Marshal.GetActiveObject("CellEditorAddin.CellEditorDlg");


      but that only works for the previous window (From Library Manager select "Tools" -> "Cell Editor") which doesn't help any as far as I can tell.




        • 1. Re: Cell Editor Automation

          Hi Andrew,


          Use "MGCPCB.CellEditorApplication" to get the Cell Editor to get the application editing the cell graphics.


          If you want to open this application, rather than connect to the running app, you would create the CellEditorAddin.CellEditorDlg instance, get to the cell object, and call the Edit method.



          • 2. Re: Cell Editor Automation

            Thanks John got it working now!


            What I did (its in C#):

            defined these globals


            MGCPCB.Application ExpApp;

            MGCPCB.Document ExpDoc;

            MGCPCB.CellEditorApplication cellEdApp;









            and then this method will hook into the cell editor and you can write code just like you would for Expedition


            private bool getCellEditor()





                 cellEdApp = (MGCPCB.CellEditorApplication)System.Runtime.InteropServices.Marshal.GetActiveObject("MGCPCB.CellEditorApplication");

                 ExpDoc = cellEdApp.ActiveDocument;

                 ExpApp = (MGCPCB.Application)ExpDoc.Application;



            catch { return false; }


            return true;