I am just trying to create a symbol and add it to a diagram and I get an overflow error. Isn''t there any simple examples of say adding two nodes and making one the root and one a child to a diagram programatically.
I have try both the InsertNodesCmd and AppendChild.
ADAdministrator Syncfusion Team May 27, 2004 01:29 PM
a) Which version of Essential Diagram are you currently using?
b) Have you taken a look at the DynamicSymbol sample that ships with Essential Diagram. In this sample refer to the MySymbol.cs file which demonstrates how you can create a custom symbol and programmatically add child nodes to it.
Kindly post an update if you have any further questions.
ADAdministrator Syncfusion Team June 7, 2004 01:52 PM
We very recently fixed a problem that was causing an overflow exception when trying to add symbols containing zero width/height shapes(horizontal/vertical line nodes). It''s possible that your problem is being caused by this error in the diagram code. If so, then the next update of Essential Diagram should take care of this issue for you.
JBJames BrockNovember 29, 2004 04:07 AM
I am using version 184.108.40.206 with VS.2003 and am attempting a rather basic task. I am creating a form which contains a Diagram component. In my Form_OnLoad event I "load a symbol" using the following code:
private void LoadTheSymbol()
// create a symbol
Symbol defSymbol = new Symbol();
defSymbol.Height = 100;
defSymbol.Width = 100;
defSymbol.X = 10;
defSymbol.Y = 10;
defSymbol.LineStyle.LineWidth = 1.1F;
defSymbol.FillStyle.Color = Color.Red;
// add a port
AnchoredPort port = new AnchoredPort(defSymbol, BoxPosition.TopLeft);
port.Visible = true;
// add a label
SymbolLabel lbl = new SymbolLabel();
lbl.Anchor = BoxPosition.BottomRight;
lbl.Text = "Child";
// add child to model
catch (Exception ex)
When I call diagramSymbol.View.Update() I get an overflow error.
I have tried the following all to no avail:
1) Not calling View.Update(), instead the overflow error occurs in my form.ShowDialog() method.
2) Using InsertNodesCmd, overflow occurs when calling Controller.ExecuteCommand(myCmd)
3) Calling Diagram.Refresh(), again this then delays the "overflow" until later on.
Am I doing something daft? Any thoughts appreciated.
ADAdministrator Syncfusion Team November 29, 2004 01:53 PM
I could not reproduce the problem using the 3.0 release candidate. Here is a sample where I pasted your code in the Form_Load and had no problems.