How can i get centre position on diagram

I want get centre position of diagram already zoomed and moved, to paste clipboard object to it.
by the way i have 2 or more diagram copy paste nodes each other.

I’m not sure I understand what you want to do, but I think you want to call Diagram.centerRect with the desired document bounds Rect area, and CommandHandler.pasteSelection with a point near the

I want paste object to other diagram use keyboard Crtl+v , paste position is diagram center.
the target diagram may be already zoom to some Rect area.

If you call CommandHandler.pasteSelection with no arguments it will call CommandHandler.pasteFromClipboard and leave the newly copied nodes where they were.

If you call CommandHandler.pasteSelection with a Point argument, the copied nodes will be moved to be centered at the given point.

i got a solution.
commandHandler.pasteSelection = function(pos) {, dgm.lastInput.documentPoint);
always paste at mouse point. it Ok for me. thanks.