I'm writing a script that is going to walk the cells in a library and for any assembly text that is not a ref des or part number, I want to copy it and add it to a new user layer called "Cell Notes" and then delete the original assembly text. I can do everything just fine except I'm having issues creating or even getting the new user layer.
I've also tried just pre-defining the user layer manually in the library but even the line below returns null. Not sure what I'm doing wrong here.
MGCPCB.UserLayer CellNotes = ExpDoc.FindUserLayer("Cell Notes");