Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: zalbina on October 31, 2012, 11:58:48 pm
-
Hello,
You can understand from this code that I'm creating baselines, but the problem is I could not trace them. The designer's creating his package. This package contains other packages with diagrams. Designer makes changes, does baseline with my Addin option to create baseline, continues with his changes, wants roll them back and Oooops. How many baselines he's created? Where to find them?
myProject = rep.GetProjectInterface();
foreach (EA.Diagram curDiagram in selPackage.Diagrams)
{
foreach (EA.DiagramObject curObject in curDiagram.DiagramObjects)
{
selElement = rep.GetElementByID(curObject.ElementID);
if (String.Compare(selElement.Type, "Package", true) == 0)
{
baselineName = selElement.Name + DateTime.Now.ToLongTimeString();
myProject.CreateBaseline(selElement.ElementGUID, baselineName, "");
}//if
}//foreach
}//foreach
baselineName = selPackage.Name + " " + DateTime.Now.ToLongTimeString(); myProject.CreateBaseline(selPackage.PackageGUID,baselineName,"");
I need a solution how to rollback to some point of changes. Let's say how to save different version of one package with rollback option. Keep in mind that package inside the other package it's very problematic because "subpackages" are used by many other users and they can do lots of changes also and "my designer" must have his version to rollback :o.
Thank you in advance.
-
Forgot to mention, some one recommended to export package in .xmi, but it does not solve my problem, because I need the rollback option.
-
OT: Just as a hint for your system architect: if rollback is so important then probably the design rules have flaws. Design should go only in one direction: the future.
q.
-
You are right, only future :) , but in my case, someone would like to go to the past :-/.