Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic SaveLoad Diagram error (Read 2157 times)
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
SaveLoad Diagram error
Aug 10th, 2011 at 9:16am
Print Post  
Hi
While saving the diagram, i am getting error
The given key was not present in the dictionary.

at Line
Code
Select All
 input.SetProperty("value", diagram.SaveToString(SaveToStringFormat.Base64));
 



  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: SaveLoad Diagram error
Reply #1 - Aug 10th, 2011 at 10:31am
Print Post  
If you want to be able to serialize and deserialize custom items, you have to register them for serialization beforehand.

Code
Select All
Diagram.RegisterItemClass(typeof(ChartNode), "classNodeId", 1); 


The above code should be executed before the SaveTo* and LoadFrom* methods of the diagram are called.

Regards,
Meppy
« Last Edit: Aug 10th, 2011 at 12:37pm by Meppy »  
Back to top
 
IP Logged
 
SL_developer
YaBB Newbies
*
Offline


coding rocks

Posts: 43
Joined: Jul 26th, 2011
Re: SaveLoad Diagram error
Reply #2 - Aug 10th, 2011 at 10:40am
Print Post  
Thanks Meppy  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint