Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Anchorpatterns after loading. (Read 2847 times)
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Anchorpatterns after loading.
Jan 24th, 2008 at 11:05am
Print Post  
Hi

In my application I have assigned anchorpatterns to a couple of boxes. If I save the my flowchart to a file, using the SaveToFile method, and then load it again, the anchorpattern is no longer assigned to the boxes.

Is it possible to keep the anchorpatterns during a save operation?


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Anchorpatterns after loading.
Reply #1 - Jan 24th, 2008 at 11:45am
Print Post  
Hi,

FlowChartX saves only the AnchorPattern.PatternId in the file. A pattern with that id must be already defined by your application when loading the file later.

Stoyan
  
Back to top
 
IP Logged
 
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Re: Anchorpatterns after loading.
Reply #2 - Jan 28th, 2008 at 5:27am
Print Post  
Hi Stoyo

Thank you for your answer. Now I know how to proceed with my application.
Regarding PatternID. If a number of boxes refer to the same PatternID, say it's called "Node", and this PatternID changes. Will all these boxes change or just the ones which will be assigned this PatternID from now on?


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Anchorpatterns after loading.
Reply #3 - Jan 28th, 2008 at 6:46am
Print Post  
Hi Magnus,

Both old and new boxes will refer to the same AnchorPattern instance. You will probably have to reset the origin and destination anchor point indices of existing arrows, in order to make their end point coordinates reflect the new anchor point positions.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Re: Anchorpatterns after loading.
Reply #4 - Jan 28th, 2008 at 7:08am
Print Post  
Hi Stoyan

I define an AnchorPattern with anchor points at (0,50) (50,50) and (100,50) and set the PatternID=Node. If I then assign this AnchorPattern to Box1, this box will ofcourse have anchor points at these positions. If I later define an Anchor Pattern with anchor points at (25,50) and (75,50) and set the PatternID=Node, I notice that any boxes assigned the AnchorPattern Node will have anchor points at (25,50) and (75,50) BUT Box1 will still have anchor points at (0,50) (50,50) and (100,50) i.e. this box is not affected by the change.

Is this behavior expected or have I done something wrong in my code since this contradicts your last answer?


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Anchorpatterns after loading.
Reply #5 - Jan 28th, 2008 at 12:02pm
Print Post  
Hi Magnus,

That is expected, the links won't update their positions until you reset the OrgnAnchor and DestAnchor properties. If you create a new AnchorPattern instance instead of modifying an existing one, you must also reassign the new object to the AnchorPattern property of the related boxes.

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