We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Identifying Flowchart types

I have 2 question Scenario For eg. i placed some symbols (Start , Process , Decision) from FlowChart Symbols, not changed any properties I have place in a jumbled way rearranged after placing the symbols ie Start (Symbol1) -- Process(Symbol3) -- Process(Symbol2) -- Decision (Symbol5) -- Process(Symbol4) 1. I want to know how to get the types for the symbol? because based on the type Decision i want to hard code some values? 2. How to loop thru the diagram in the order i have placed? right now i am getting as symbol1 ,2 ,3,4,5 but i have placed in a jumbled (see above) Thanks in advance

3 Replies

AD Administrator Syncfusion Team December 19, 2005 08:41 PM UTC

Hi Rajkumar, All symbols use the same base Syncfusion.Windows.Forms.Diagram.Symbol class as the base, and accessing just the type will not let you pin point the symbol. The correct way to identify a symbol would be through the Symbol.Name property. If you are designing your own symbols using the Essential Diagram SymbolDesigner you can provide an easily identifiable value for the SymbolModel''s Name proeperty, and the same Name will be used for the Symbol when it is created. Multiple instances of the Symbol will have the name plus an indexer. Another option would be to listen to the Diagram.ChildrenChangeComplete event and if you detect that a new Symbol has been added, then provide a value for it''s Name property. Symbols with unique names can then be easily accessed by using the Diagram.Model.GetChildByName(string) method or iterating through the diagram Model''s Nodes collection. I assume you are looking at a way to iterate the model as a graph by using the links to move from symbol to connecting symbol. Assuming that you have a reference to the root symbol, you can iterate the diagram graph by suitably combining the Symbol.EdgesEntering, Symbol.EdgesLeaving, Link.FromNodes and Link.ToNodes properties. The following Essential Diagram KB article provide additional information on using the above properties to traverse the diagram - http://www.syncfusion.com/support/kb/diagram/Default.aspx?ToDo=view&questId=44 Prakash Surendra Syncfusion Inc.,


RA Rajkumar December 20, 2005 06:10 AM UTC

Hi Prakash Surendra Thanks Prakash for you response I am using Version 3.300.0.0 I tried still its giving only symbol , symbol1 etc., but when i open in the symbol designer its name is Decision. can you plz provide with source code for the problem 1 How to create flowchart symbol ( Decision ) etc programatically. can you plz provide with source code Regards Rajkumar >Hi Rajkumar, > >All symbols use the same base Syncfusion.Windows.Forms.Diagram.Symbol class as the base, and accessing just the type will not let you pin point the symbol. The correct way to identify a symbol would be through the Symbol.Name property. If you are designing your own symbols using the Essential Diagram SymbolDesigner you can provide an easily identifiable value for the SymbolModel''s Name proeperty, and the same Name will be used for the Symbol when it is created. Multiple instances of the Symbol will have the name plus an indexer. Another option would be to listen to the Diagram.ChildrenChangeComplete event and if you detect that a new Symbol has been added, then provide a value for it''s Name property. Symbols with unique names can then be easily accessed by using the Diagram.Model.GetChildByName(string) method or iterating through the diagram Model''s Nodes collection. > >I assume you are looking at a way to iterate the model as a graph by using the links to move from symbol to connecting symbol. Assuming that you have a reference to the root symbol, you can iterate the diagram graph by suitably combining the Symbol.EdgesEntering, Symbol.EdgesLeaving, Link.FromNodes and Link.ToNodes properties. The following Essential Diagram KB article provide additional information on using the above properties to traverse the diagram - >http://www.syncfusion.com/support/kb/diagram/Default.aspx?ToDo=view&questId=44 > >Prakash Surendra >Syncfusion Inc.,


AD Administrator Syncfusion Team December 21, 2005 07:58 PM UTC

Hello Rajkumar, You are right about this issue. The SymbolModel class used in the 3.300.0.0 version of Essential Diagram was not using the SymbolModel''s name for the Symbol. This problem was fixed as a part of the 3.3.0.1 minor update after the 3.300.0.0 release. If at all possible, please try to upgrade to the new 4.1 beta version, as this release features several new enhancements and fixes to the Essential Diagram codebase. An option would be to upgrade to the 3.3.0.10 minor update as that will provide the fix for this particular issue. If you are unable to upgrade right away, and have access to the source code version of the product then you could add the fix for the issue by making the follwing correction to the SymbolModel.CreateSymbol() method found in the Diagram.Base\Src\Symbols\SymbolModel.cs file, change, if (sym != null) { // Bestow upon the new symbol all properties of the symbol model that // are valid for the symbol. ... ... } to, if (sym != null) { sym.Name = this.Name; // Bestow upon the new symbol all properties of the symbol model that ... ... } You can use the Essential Studio AssemblyManager to rebuild the library after making this correction. Regards, Prakash Surendra Syncfusion Inc.,

Loader.
Live Chat Icon For mobile
Up arrow icon