Since there is no easy way to access a cell from a library in the new API, I have written my own which goes thru the cell library DGN file(s) and extracts the dgnmodel for the desired cell.. It is recreated child by child and placed in a CellHeaderElement in the active model.
I was recreating the children by using the following to copy from the cells DgnModel to the Active DgnModel:
public static Element Clone(this Element ele) { Element newEle; using (ElementCopyContext copy = new ElementCopyContext(Ms.GetActiveModel())) { copy.DisableAnnotationScaling = true; newEle = copy.DoCopy(ele); } return newEle; }All was well, until I noticed that my cell was being duplicated at 0,0,0... This is due to the ElementCopyContext also adding the element to the model.Any suggestions on how I can make a clone of the element and store in memory without adding it to the DGN active model?I cannot simply use the Element returned from the Cell DgnModel.