WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Create ERD, Add Entities & Relationships using VBA

 
   Home -> Office other -> Creating Shapes RSS
Next:  Creating Shapes: Precise dimensions for the width of an L room  
Author Message
BigJ

External


Since: Sep 10, 2007
Posts: 1



(Msg. 1) Posted: Mon Sep 10, 2007 12:55 am
Post subject: Create ERD, Add Entities & Relationships using VBA Add to elertz
Archived from groups: microsoft>public>visio>database>modeling, others (more info?)

I have spent the past 4-5 hours trawling Google web & groups in vain,
looking for info. I want to do the following in VBA in Visio 2003
Professional:

1. Create a new ER diagram
2. Create two entities
3. Add some fields to each entity, specifying basic details (data
type, required, primary key)
3. Create a relationship between the two entities

I can do these things manually in my version of Visio 2003
Professional (i.e. in the UI), but I need to automate the procedure. I
would have thought this should be basic and universal!

PLEASE, could someone assist? Also, can anyone suggest a reference
that covers this topic in detail?
Back to top
Login to vote
Serge

External


Since: May 20, 2006
Posts: 5



(Msg. 2) Posted: Wed Oct 31, 2007 9:56 am
Post subject: RE: Create ERD, Add Entities & Relationships using VBA Add to elertz [Login to view extended thread Info.]
Archived from groups: microsoft>public>visio>createshapes, others (more info?)

http://visio.mvps.org/VBA.htm
Back to top
Login to vote
Serge

External


Since: May 20, 2006
Posts: 5



(Msg. 3) Posted: Wed Oct 31, 2007 10:01 am
Post subject: RE: Create ERD, Add Entities & Relationships using VBA Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I saw this example on site "http://visio.mvps.org/VBA.htm"

Dropping a Master: This subroutine will drop a master on the page.

You need to get a Master or Shape object to drop on the page before calling
the Drop method. The example below drops the Circle shape from the Blocks
Raised stencil on the current drawing page.
Public Sub TestDropShape()
Dim stencil As Visio.Document, mstCircle As Visio.Master
Set stencil = ThisDocument.Application.Documents.Open("Blocks Raised.vss")
ThisDocument.Application.Windows(ThisDocument.Index).Activate
Set the ActiveWindow to the drawing window.
Set mstCircle = stencil.Masters("Circle") ' Get the master named "Circle"
and drop that shape on the page!
ThisDocument.Pages(1).Drop mstCircle, 1, 3 ' Drop the shape, mstCircle, at
location X=1 Y=3
End Sub
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Creating Shapes All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET