How to Specify Mulitple FromPorts and toPorts

HI Every one!

I am starting off with E-R diagram sample and have one question regarding relations.
I have to show a relation that has multiple source columns and relate to multiple destination columns.
One thing i am looking for is how to specify multiple FromPorts and toPorts for a single relation.
is it possible or i have to follow some other route. ?
Thanks
Kamran

You need to set/bind the go:Node.PortId attached property on each FrameworkElement that you want to act as a “port”. To get a Link to connect to a particular port, make sure you use a GraphLinksModel and have the link data use the same port id string as the FromPort or ToPort properties.

The various other attached properties that affect ports also apply to each element, namely: go:Node.From…, To…, and Linkable…. You’ll probably want to at least set the FromSpot and ToSpot attached properties.

Thanks Walter for response.

If i have understood correct this create separte lines between source and destination port for same link.
what i am looking for is following for a link (sorry could not find a way to upload a image)
----| |-----
----|--------------------|------
----| |------
where left side and right side are columns of a multi column relation with respect to E-R diagram sample.

I’m not sure what you mean.

Normally there would be separate links between each pair of ports for which there is a relationship.
(You can even have duplicate links between the same pair of ports, but you probably don’t need that.)

Did you want all of the links to be merged into a single line for most of the way between any two nodes? Did you want them to split up into separate lines very close to the node?

That’s not functionality that comes with GoXam, but you can get that effect by just using a single Link connecting any pair of Nodes and implementing the “tines of the fork” at each end using a different drawing mechanism that would be part of each node.

One advantage of this technique is that you can use a completely differently looking link stroke (typically thicker) for the “cable” between nodes than for the short segments at each node.

But I’m not at all confident that I understand what you want.

Yes ! i think we are still not on same page.
Here is what our workflows is.
We support table relations where user can specify multiple table columns as source of a db relation and then define multiple columns in destination table as destination of relation.
Thus making a single one to one or one to many db relation that has multiple source and destination columns.That means our single db relation can have many source columns and destination columns.<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />
If I use normal approach of connecting tables as per goxam e-r diagram sample I can only show a line between one source and one destination column.

Now my problem is that user would not able to see his multiple source and destination columns that are participating in a relation.

I want to show user that this relation has this many involved source and destination columns I hope you understand our work flow now.

Thanks for the help so far

Ah, well, that’s good, because that’s exactly what GoXam offers.
The Dynamic Ports sample might be instructive, even though it doesn’t look like what you want.

Just follow my initial advice.

Thanks for the help so far.

After making the required chanes, I have now relations that point to proper columns.For each there is one line that has single source and destination columns.
Now my single relation has multiple source columns.
how can i show the multiple source colums instead of a relation pointing to only one source column.?

You can have multiple Links for each of your relationships.

Or you could do what I was guessing at earlier – having a single Link but somehow drawing a “fork” at your source.

Or you could do yet a third alternative: create a Node that has its own (orthogonal?) links to the individual columns, and the main relationship Link just connects to that Node. If you have multiple destination columns for a single relationship, you would need to do the same kind of thing at the destination end.

A fourth alternative is a variation on the third one: have the single extra Node be in the middle, with Links to the source column(s) and Links to the destination column(s). This design is particularly appropriate when you want to treat the columns differently within a single relationship.

Thanks for all the help.