Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic save custom anchorpattern (with ID ) in SaveToFile (Read 5423 times)
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
save custom anchorpattern (with ID ) in SaveToFile
Apr 29th, 2012 at 3:29pm
Print Post  
I use a custom anchorpattern from script, so I define one at the clientside. (with ID, wich is the only possible way)
When I load A saved diagram (serverside SaveToFile), the custom AnchorPattern isn't available. Even when create it at the serverside before loading, the loaded diagram doesn't recognize it.
Now I have to wait till clientside code is excuted, then do a extra postback and reload my diagram, before my anchorpattern is present in the saved nodes.
Wouldnt it be nice when the custom anchorpattern (with ID) is saved with the diagram ?
Maybe even better when the anchorpattern collection (includiong custom anchorpatterns) is a property of the diagram.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: save custom anchorpattern (with ID ) in SaveToFile
Reply #1 - Apr 30th, 2012 at 6:28am
Print Post  
There shouldn't be anything stopping you from creating an AnchorPattern without ID - then its full definition will be serialized along with nodes. We'll try to implement serialization for patterns with ID for next release in any case, at least that might save some bandwidth by sending the serialized pattern only once and then referencing it by ID from the nodes' XML.
  
Back to top
 
IP Logged
 
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
Re: save custom anchorpattern (with ID ) in SaveToFile
Reply #2 - Apr 30th, 2012 at 10:58am
Print Post  
I cannot find any way to create an anchorpattern from script without ID. The scripthelper.createAnchotpattern has no overload as far as I can see in the helpfiles.
I get a Runtime-error Microsoft JScript: java.lang.IllegalArgumentException: No method found matching name createAnchorPattern and arguments []
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: save custom anchorpattern (with ID ) in SaveToFile
Reply #3 - Apr 30th, 2012 at 11:56am
Print Post  
Try creating it with null or empty string id argument:

var ap = scriptHelper.createAnchorPattern(null);

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