Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) I could facilitate an example (Read 7842 times)
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
I could facilitate an example
Sep 22nd, 2008 at 7:05pm
Print Post  
I have an application that I designed plot by their control which takes information from the database and keep it as an image but when I create a new goal this I am not going to comply because it will read the file where you save.

As might make my goal created appears in my diagram store without being loaded again, because I could erase the connectors if it creates again.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: I could facilitate an example
Reply #1 - Sep 23rd, 2008 at 7:38am
Print Post  
You need to detect when the user draws new items and add corresponding records to your database?
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #2 - Sep 23rd, 2008 at 6:29pm
Print Post  
Stoyan,
You commented:
I have an application that I designed the chart for its control which takes the information from the database and saves it as an image but when I create a new obj that I am not going to comply because it is going to read the file where you saved.

  As might make my created node (strategic objectives) appears in my chart that you save without being charged again?, Since I could erase the connectors if it is created again.

In my diagram for example, I have 10 nodes (strategic goals), then the relationship through links and then burn it, now I create a new node (from sql server I create a new strategic objectives) when I open the diagram I erased everything else, as I do so that in my chart display the 11 nodes (strategic objectives),

I hope I understand.

greetings
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: I could facilitate an example
Reply #3 - Sep 24th, 2008 at 7:37am
Print Post  
I'm afraid I don't understand Undecided Do you need to add a record to your database when a node or a link is created? Without deleting some other records?
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #4 - Sep 24th, 2008 at 12:24pm
Print Post  
Stoyan,
Yes, I need to discover what and how I can also record in the database and then change my diagram.
I could give you an example in this regard??
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: I could facilitate an example
Reply #5 - Sep 24th, 2008 at 12:26pm
Print Post  
Please send an example to support@mindfusion.eu.

Stoyan
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #6 - Sep 24th, 2008 at 1:06pm
Print Post  
Stoyan
I just send the sample to the mail
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: I could facilitate an example
Reply #7 - Sep 24th, 2008 at 3:23pm
Print Post  
Quote:
what I want is that the definitions of links between nodes recorded in the database and then be able to modify


If there will be just one link between nodes, as shown on that screenshot, you might add a DestinationID field to the nodes' table. Set the value of that field to the ID of the record that corresponds to the link's Destination node. To make it easier to map nodes to their records in the database, you could assign the value of the ID field to the node's Tag. Then when saving the link information, get the value of DiagramLink.Destination.Tag and assign it to the DestinationID field.

If you expect to have a random number of links between nodes, you must create a new table for storing the relations defined through links. You should add OriginID and DestinationID fields, and possibly other fields for the any link properties you'd like to have. Now store the Tag values of the link's Origin and Destination nodes into the OriginID and DestinationID fields.

When loading the diagram, first create all nodes and set their Tag to the record's ID field value. Next create links using the Diagram.FindNode(tag) method, which will let you find the nodes corresponding to the respective OriginID and DestinationID.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #8 - Sep 25th, 2008 at 12:29pm
Print Post  
Stoyan,

Thanks for responding, I see that I got it right. What I do is bring the nodes randomly, I could provide an example to be able to implement?

greetings.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: I could facilitate an example
Reply #9 - Sep 25th, 2008 at 1:06pm
Print Post  
It shouldn't matter in what order you are loading the nodes, as long as you save their record IDs as Tag values, so that later you can find the related nodes when creating a link.
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #10 - Sep 25th, 2008 at 1:13pm
Print Post  
Again, thank you very much for responding quickly. I'm going to try and I will keep you informed.

greetings
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #11 - Sep 30th, 2008 at 6:01pm
Print Post  
Stoyan

i need to save in database all the position of the shapes and links from my diagram.

i see your code in somewhere talk this:

" For Each node In diagram.Nodes "

can you tell me if exist any collection of the shapes ? if the answer is yes. how can i work whit this collection? i need to see the position of any shape in the diagram.

and after this, i need to see the origin and destinity of any link in the same way.

thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: I could facilitate an example
Reply #12 - Sep 30th, 2008 at 6:28pm
Print Post  
Diagram.Nodes includes nodes from all DiagramNode-derived types, including ShapeNode. You can get the position of a node through its Bounds property. If you need to access ShapeNode specific properties while enumerating Diagram.Nodes, you will have to type-cast the node variable to ShapeNode. There are Origin and Destination properties in DiagramLink that return the respective node. Again, you will have to cast them to ShapeNode if you need to use ShapeNode-specific properties.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #13 - Oct 3rd, 2008 at 8:34pm
Print Post  
Stoyan,

I could send an example of how record in the database as follows:

Save the nodes x, y, w, h when to go again in the diagram is in the last position.

Save deniciones nodes through links

I would be much obliged

greetings
  
Back to top
 
IP Logged
 
calin36
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Sep 10th, 2008
Re: I could facilitate an example
Reply #14 - Oct 4th, 2008 at 11:35pm
Print Post  
I have a tag and that tag is concatenated with a description and again if it modifying the description gets lost everything.
That there is a solution in this regard.

greetings
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint