(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?
(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
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