Hi,
Here's an example using dbx (no error handler).
A layout is mainly composed by two objects : the layout object (plot settings and visual properties) which can be copied by vla-CopyFrom, and an block (graphic objects and viewports) which components can be copied by vla-CopyObjects.
In this example odbx is the document opened with DBX (source), *acdoc* the active document (target).
(vlax-for l (vla-get-Layouts odbx)
(if (/= (setq name (vla-get-Name l)) "Model")
(progn
(setq objlst nil)
(vlax-for o (vla-get-Block l)
(setq objlst (cons o objlst))
)
(setq newlay
(vla-add (vla-get-Layouts *acdoc*)
(strcat
name
"_copy"
)
)
)
(vla-Copyfrom newlay l)
(vlax-invoke
odbx
'CopyObjects
(reverse objlst)
(vla-get-Block newlay)
)
)
)
)