Hi,
I am having trouble loading a diagram with some custom labels added to the symbols. The project is based on the sample DiagramBuilder project. I have implemented a number of wrapper classes:
PEPDiagram : Diagram
PEPModel : Model
PEPSymbolLabel : SymbolModel
I believe I have implemented the necessary methods for serialization of the new properties added to the classes. I can save and load a diagram when my symbols DO NOT contain PEPSymbolLabels. However, when I add a PEPSymbolLabel I CAN save it, but when I attempt to open the save diagram I get an error:
Serialization error - Exception has been thrown by the target of an invocation.
I then get an exception:
//----
An unhandled exception of type ''System.NullReferenceException'' occurred in DiagramBuilder.exe
Additional information: Object reference not set to an instance of an object.
//----
When I step through the code, the serialization is attempting to set the value of the PEPSymbolLabel.ReadOnly property, it is at this point that the exception is raised.
It is almost as if there is no instance of PEPSymbolLabel before it attempts to set the property.
I have attached my source code. Any help would be much appreciated.
Am newbie to C# so I suspect that I am doing something daft!
Thanks for you quick response in previous posts.
Jimski
PE3 Demo_8403.zip