Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Geert Bellekens on March 17, 2012, 12:38:39 am

Title: Create a copy of a sequence diagram
Post by: Geert Bellekens on March 17, 2012, 12:38:39 am
Does anyone have ready made code to copy a sequence diagram?
From what I see now I'll have to:

Geert
Title: Re: Create a copy of a sequence diagram
Post by: Luis J. Lobo on March 23, 2012, 09:54:02 am
If the Sequence diagram is alone into a Package containing the diagram and the collaborating objects (instances of classes), then use the "Package.Clone()" method.

Else, if the diagram is under an "Interaction" object containing the diagram & objects, move temporarily the Interaction (Element.PackageID) to a temp package, clone it, and relocate the Interaction object.

Regards,
Title: Re: Create a copy of a sequence diagram
Post by: Geert Bellekens on March 23, 2012, 07:33:19 pm
Thanks Luis,

That is a great workaround!
(I sort of feel bad that I didn't think of it :-[)

Geert