What's the command you are using for the dbOpenCellViewByType? From then info provided, it sounds like you opened in read-only mode instead of a writeable mode. This would be the last (fifth) entry into the command. I think you want append mode "a", but there are 9 you can choose from which are detailed in the documentation.
cvdb=dbOpenCellViewByType("libName" "cellName" "viewName" nil "a")
That being said, I'm not that familar with PCell creation, or the specific problem you are encountering.