Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dragging Tables with their links onto a new Physical Diagram

758 views
Skip to first unread message

Mark Brady

unread,
Jul 20, 2009, 6:53:19 PM7/20/09
to
Ok,

I know there's a trick. Can I drag a table from the browser onto a new
diagram and have it bring connected objects as well?

As a corollary, can I drag two tables which have a link onto the
diagram and get the link to show up without having to select the link
out of the browser?

Paul Horan[Sybase]

unread,
Jul 21, 2009, 9:36:51 AM7/21/09
to
Memory is a little fuzzy on this, but isn't there a "Complete References"
option? So you drag the tables you want (which come over without
references), then you "Complete References" and it creates them in the new
diagram.

--
Paul Horan[Sybase]
http://blogs.sybase.com/phoran/

"Mark Brady" <fod...@gmail.com> wrote in message
news:f4da6a7c-2408-4594...@p23g2000vbl.googlegroups.com...

billbunke

unread,
Jul 21, 2009, 10:14:53 AM7/21/09
to
Another idea that I seem to remember; adding a reference to
a diagram (hopefully by dragging) should bring both tables
as well.


> Memory is a little fuzzy on this, but isn't there a
> "Complete References" option? So you drag the tables you
> want (which come over without references), then you
> "Complete References" and it creates them in the new
> diagram.
>
> --
> Paul Horan[Sybase]
> http://blogs.sybase.com/phoran/
>
> "Mark Brady" <fod...@gmail.com> wrote in message
> news:f4da6a7c-2408-4594...@p23g2000vbl.goog

> > legroups.com... Ok,

Matt Creason

unread,
Jul 21, 2009, 11:57:58 AM7/21/09
to
That's it. And make sure that your settings are correct or that you are
using the right-click drag to ensure the copy behaves in the manner you
expect (i.e. shortcut vs. copy)

-Matt C.
Matt Creason
Principal System Consultant, PowerDesigner

Mark Brady

unread,
Jul 21, 2009, 4:15:37 PM7/21/09
to
On Jul 21, 11:57 am, Matt Creason <m...@mattcreason.com> wrote:
> That's it. And make sure that your settings are correct or that you are
> using the right-click drag to ensure the copy behaves in the manner you
> expect (i.e. shortcut vs. copy)
>

Yeh but that requires that I have the references named, if I've just
reversed something I have a huge list of numbered references.

David Dichmann [Sybase]

unread,
Jul 24, 2009, 8:49:45 PM7/24/09
to
Another way to do this is to have everything on a "temporary" diagram - and
select the table, use the pop-up menu to select connected objects, then use
View -> Diagram -> New Diagram. This will create a diagram from all
selected symbols. Now - autolayout to manually change things to the layout
you want.

Matt Creason

unread,
Jul 24, 2009, 9:19:09 PM7/24/09
to
I answered the first already. No, but you can use the Show Symbols dialog.

The second is yes. After adding the two tables, go to Tools, Complete
Links.

Matt Creason

unread,
Jul 24, 2009, 9:17:09 PM7/24/09
to
OK, so do this. Go to Symbols, Show Symbols, References. You will see
all the references and their Parent/Child tables. As you click on the
reference to display, it will put both the Parent/Child table on the
diagram.

rkkier

unread,
Jul 27, 2009, 2:44:32 PM7/27/09
to

I'm not sure you can do this with drag & drop but you can create a
context menu to get all the associated objects and add the
relationships.

Not my code originally, but I don't recall where I found it:

1. Create a custom method on the Table metaclass and paste this code
in:

Sub %Method%(obj)

Dim References
Dim Reference
Dim simple

set References=obj.OutReferences
for each Reference in References
set simple = activediagram.AttachLinkObject(Reference)
next

End Sub

2. Create a custom menu and place this method in it (we called it Get
Parent Tables).

Then you can create your first table on an empty diagram, right click
and get all it's parents.

Here's the child table code. Using these two methods you can start
with one table and just add child/parent tables until you've got all
the items you want on your diagram.

Sub %Method%(obj)

Dim References
Dim Reference
Dim simple

set References=obj.InReferences
for each Reference in References
set simple = activediagram.AttachLinkObject(Reference)
next

End Sub

Yongsheng

unread,
Oct 7, 2009, 11:57:27 AM10/7/09
to

Dear rkkier,

You propose perfect solution. Could you tell me how in
detail?

Chris Baker[Sybase]

unread,
Dec 17, 2009, 9:44:17 AM12/17/09
to
It's simpler to use the the 'Tools/Complete Links' command (CTL-F5) to have
PD add the symbols for the relationships to the diagram.

Another way is for you to drag the relationship from the browser to the
diagram. This will bring the attached tables with it.

Chris

"Yongsheng" wrote in message news:4accba67.46d...@sybase.com...

0 new messages