Hi,
We have a requirement to create a diagram template programmatically - a simple diagram that will be opened later by the user. There is no UI involved.
I have used some of the code from your online demos, but I'm at a point where I need to save the diagram.
Ideally I'd like to get a string that I can save to our database, much like I'm currently doing on the client.
Is there a diagram.save equivalent in code behind?
Here's what I have now (it should look familiar):
protected void CreateDiagramStub(String newActivityId)
{
Diagram diagram = new Diagram();
SwimLane swimlane = new SwimLane();
swimlane.Type = "swimlane";
swimlane.Name = "swimlane";
Header header = new Header();
header.Text = "Process / Activity";
header.Height = 50;
header.FillColor = darkColor;
header.FontSize = 11;
swimlane.Header = header;
swimlane.FillColor = darkColor;
swimlane.Orientation = "horizontal";
swimlane.OffsetX = 350;
swimlane.OffsetY = 290;
swimlane.Height = 100;
swimlane.Width = 650;
swimlane.Lanes = CreateLanes();
swimlane.Phases = CreatePhases();
diagram.Model.Nodes.Add(swimlane);
//String saveData = diagram.Save("myDiagram"); // What I'd like to do!
Any suggestions?
Thanks
Jim
}