I need to run a script for the cell already opened in Cell Editor (from the Central Library). For example, this script would count the vias in the cell. I am slightly confused how to start writing a script describing the objects. I think my script should look like the following (suppose I don't need the first 3 lines and I commented them out):
'Set app = GetObject (,"LibraryManager.Application")
'Set lib = app.ActiveLibrary
Set cellEditor = CreateObject("CellEditorAddin.CellEditorDlg")
Set cellDB = cellEditor.ActiveDatabase
Set doc = cellDB.ActiveDocument
MsgBox doc.Vias.Count, 0, ""
However, this script outputs the error in the "Set cellEditor" line.
Would anybody clarify how to correctly start the script?