Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramView3D loading issue (Read 2231 times)
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
DiagramView3D loading issue
Jun 28th, 2011 at 2:26pm
Print Post  
After I create nodes and make links between nodes and save
When I load the xml fille the diagram is empty

here is the load code


    diagram.LoadFromXml(mfile.FullName)
  diagramView3D.ResetProjection()
       diagramView3D.Focus()
       diagramView3D.Behavior = Behavior.DoNothing
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView3D loading issue
Reply #1 - Jun 29th, 2011 at 7:52am
Print Post  
3D positions are not serialized with the diagram at this time. As a workaround you could set them as tags and save them by handling the SerializeTag and DeserializeTag events.
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: DiagramView3D loading issue
Reply #2 - Jun 29th, 2011 at 7:55am
Print Post  
Could you provide a sample please
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView3D loading issue
Reply #3 - Jun 29th, 2011 at 9:44am
Print Post  
Assuming you have assigned the point positions directly to the nodes' Tag property:
Code
Select All
void diagram_DeserializeTag(object sender, SerializeTagEventArgs e)
{
	e.Tag = new Point3D(
		e.Context.ReadFloat("X", e.Representation),
		e.Context.ReadFloat("Y", e.Representation),
		e.Context.ReadFloat("Z", e.Representation));
	e.Handled = true;
}

void diagram_SerializeTag(object sender, SerializeTagEventArgs e)
{
	Point3D point = (Point3D)e.Tag;
	e.Context.WriteFloat(point.X, "X", e.Representation);
	e.Context.WriteFloat(point.Y, "Y", e.Representation);
	e.Context.WriteFloat(point.Z, "Z", e.Representation);
	e.Handled = true;
} 

  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: DiagramView3D loading issue
Reply #4 - Jun 29th, 2011 at 10:08am
Print Post  
Thx
u r always helpful
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint