Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Loading diagram from Stream (Read 3504 times)
Mohammad
YaBB Newbies
*
Offline


Hello everybody :)

Posts: 32
Joined: Oct 2nd, 2009
Loading diagram from Stream
Oct 2nd, 2009 at 1:47am
Print Post  
Hi

I save the diagram in database using Diagram.SaveToStream() method. I've inserted an image for each shapes in shape designer. but when I load the diagram from stream it loses nodes' images. ClientSideMode is JavaApplet.
How can I solve the problem?
Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Loading diagram from Stream
Reply #1 - Oct 2nd, 2009 at 7:56am
Print Post  
Hi,

How are you setting these images - by setting the ShapeNode.Image property? or are they specified in custom Shape definitions as standard images for some shape?

Stoyan
  
Back to top
 
IP Logged
 
Mohammad
YaBB Newbies
*
Offline


Hello everybody :)

Posts: 32
Joined: Oct 2nd, 2009
Re: Loading diagram from Stream
Reply #2 - Oct 2nd, 2009 at 11:32am
Print Post  
Thank you for your immediate reply.
I've inserted images with Shape Designer tool inside each shape. The image type is jpg.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Loading diagram from Stream
Reply #3 - Oct 2nd, 2009 at 1:18pm
Print Post  
Is the shape library loaded at the time you call LoadFromStream? If it isn't, the Shape property of nodes will revert to Rectangle and the nodes won't display any shape images, but only ShapeNode.Image if set.
  
Back to top
 
IP Logged
 
Mohammad
YaBB Newbies
*
Offline


Hello everybody :)

Posts: 32
Joined: Oct 2nd, 2009
Re: Loading diagram from Stream
Reply #4 - Oct 2nd, 2009 at 1:37pm
Print Post  
No it isn't loaded and the Shape property of nodes reverts to Rectangle. What's wrong? How can I fix it?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Loading diagram from Stream
Reply #5 - Oct 2nd, 2009 at 2:20pm
Print Post  
If you set the DiagramView.ShapeLibraryLocation to just the name of the file, it should be loaded automatically both on the server and client side. If it's a full URL, you must add an explicit call to ShapeLibrary.LoadFrom(localPath) to your Page_Load handler.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint