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

SymbolDesigner like editing of symbol models

I am trying to edit symbolmodels in a diagram control like in the Symbol Designer. So as not to corrupt my symbol model what would be the correct way to load and save the model to a diagram control? I now only have it partially working and I know I am missing something.

3 Replies

AD Administrator Syncfusion Team October 28, 2004 11:06 PM UTC

Hi Truman, From your explanation above it not clear what you are trying to do. Can you post more information or a sample. Symbols versus Symbol Models When using the Symbol Designer, it is important to keep in mind the distinction between symbols and symbol models. The Symbol Designer edits symbol models, not symbols. Symbol models are used to create symbols at run-time. They are similar in the sense that they both contain the same child nodes and properties, but the symbol model is only used at design-time. A symbol model is the design-time representation of a symbol. The Symbol Designer occasionally uses the terms "symbol model" and "symbol" interchangeably. Since the Symbol Designer is a design-time utility, it only deals with the design-time representation of a symbol, which is the symbol model. Based on this information can update this post with more information. Regards Arun

TL Truman Lackey October 29, 2004 01:45 AM UTC

I am trying to edit symbol models, like what is done in the Symbol Designer application. I am just not sure which nodes need to be copied back and forth from the diagrm to the symbol model or even if this is the correct way to do it. I understand the difference between a symbol model and a symbol and how a symbol is created from a symbol model. I am not sure how to correctly edit a symbol model in a diagram control and be able to save the changes in the diagram to a symbol model representation, or how to load the symbol model into a diagram. I have an idea that I may need to copy all of the nodes from the symbol model into a diagram control and then when I am done editing the symbol model in the diagram I clear the symbol model nodes and then copy all of the nodes from the diagram to the symbol model. Tips, pointers, suggestions or code example on how to correctly do this would help me a lot. Thanks Truman

AD Administrator Syncfusion Team October 29, 2004 03:19 PM UTC

Hi Truman As per my update in Direct-Trac: If you look at the following line in the file SymbolDocument.cs this.Diagram.AttachModel(model); in the Symbol Designer application you''ll see that the model created by the diagram control is replaced with a SymbolModel and this is done becuse we did not want to have to write a separate Diagram control just for editing Symbol models. From your explanantion it looks like you are trying to do is edit your Symbol model using a Diagram control but the Diagram control doesn''t create a Symbol model, so you have to create it outside of the Diagram control and attach it as demonstrated in the sample or or you could subclass the Diagram control and override the CreateModel() method. Regards Arun

Live Chat Icon For mobile
Up arrow icon