Good morning Stoyo,
Thank you for helping with the upgrade of FlowChartx 4.1 to 4.5. We were able export to the new XML format.
However, when we try to load these xml files, I get the error "The object reference not set to an instance of an object."
This is strange because it is so simple 1 or 2 lines of code and the diagram object is not null.
I tried this 2 ways. Load from String and Load from XML. Both give the same error:
StreamReader reader = File.OpenText("C:\\eurail_pass.xml");
string xmlstuff = reader.ReadToEnd();
diagram.LoadFromString(xmlstuff);
diagram.LoadFromXml("C:\\eurail_pass.xml");
The object 'diagram' is a 'MindFusion.Diagrammgin.Wpf.Diagram'.
With this object I can load diagrams created by our new program.
Here is a clip of the XML file:
<Diagram Version="12">
−
<Nodes>
−
<Node Class="std:ShapeNode" Id="0" Version="1">
<Bounds>8.000000, 120.000000, 188.000000, 107.000000</Bounds>
<ZIndex>0</ZIndex>
<ToolTip>|eurail_pass_526</ToolTip>
<Locked>False</Locked>
<Visible>True</Visible>
<Printable>True</Printable>
<Selected>False</Selected>
<Brush Id="0"/>
−
<Pen>
<Color>#FF000000</Color>
<DashStyle>0</DashStyle>
<Width>1.000000</Width>
</Pen>
<ShadowOffsetX>3.000000</ShadowOffsetX>
<ShadowOffsetY>3.000000</ShadowOffsetY>
<Weight>1.000000</Weight>
<IgnoreLayout>False</IgnoreLayout>
<HyperLink/>
−
<Constraints>
−
<Constraint Type="0">
<Value>0</Value>
</Constraint>
−
<Constraint Type="1">
<Value>0.000000</Value>
</Constraint>
−
<Constraint Type="2">
<Value>0.000000</Value>
</Constraint>
−
<Constraint Type="3">
<Value>0.000000</Value>
</Constraint>
−
<Constraint Type="4">
<Value>0.000000</Value>
</Constraint>
</Constraints>
<Obstacle>True</Obstacle>
<AllowIncomingLinks>True</AllowIncomingLinks>
<AllowOutgoingLinks>True</AllowOutgoingLinks>
<EnabledHandles>-1</EnabledHandles>
<HandlesStyle>1</HandlesStyle>
<Expanded>True</Expanded>
<Expandable>False</Expandable>
<XStyle>2</XStyle>
−
<Text>
ID:524
A: I want to buy a Eurail Pass
R: Eurail offers 4 different types of passes. The Global Pass, the Regional Pass, the National Pass and the Select Pass. Which Pass would you like to purchase?
</Text>
<TextColor>#FF000000</TextColor>
<PolygonalTextLayout>False</PolygonalTextLayout>
−
<TextFormat XValue="16">
<Alignment>0</Alignment>
<LineAlignment>0</LineAlignment>
</TextFormat>