VBA Doorway to Database Properties

V

victorcamp

How do I access the data in the Database Properties window from VBA?

I have searched the help files and numerous properties via the Immediate
Window, but cannot find an opening to the underlying Database Properties in
the object model. I can access the ShapeSheet, but that has no info on the
relationship itself. I can get the field list via .Text in the individual
Entities, but not the table name. Where is all that stuff found? (I suspect
it might be through the UI, but I've had no luck there, either.)

My diagram is a reverse-engineered Access 2003 database, with over 280
relationships. The Page is huge and complex. When I refresh the model, I
lose all the text on the relationship lines. I want to be save all that
data, and re-create it, as well as new ones, via VBA. Some specific syntax
examples would be very, very helpful.

I posted this first in the Database.Modeling forum, but I thought I'd give
this one a try as well.
 
A

AlEdlund

the database (and uml) add-ins are proprietary code with no published api's.
sorry,
al
 
V

victorcamp

I've just found a reference to the VisioModelingEngine, which I'm exploring
right now. I'll see if that's it...
 
V

victorcamp

I've now got all the VisioModelingEngine (VME) data, I just have to figure a
way to sync it with the Shape data...

I was looking to see if any of the IDs were the same, but they don't appear
to be:
Visio Shapes: 458 Shapes
IDs numbered: 1 - 1098
VME Elements: 2770 Elements
ElementIDs numbered: 16 - 63025

I see the Shape data has unique GUIDs, but I don't find them anywhere in the
VME.

I suppose I could compare the field and index data I can get from the Entity
Shape Text property against the field listing in the VME, but that seems
awfully clumsy. And, since I can't seem to find the Shape title line (the
table name) listed in any Shape data, I would have to assume no 2 tables
have the exact same layout (though that should be a reasonable assumption).

Any other ideas? (Like where can I get the Entity's title line?)
 
V

victorcamp

OK, I've got the cross-reference table between Entity Shapes and Database
Tables using VBA, though getting there was a bit clumsy.

I'm burnt out for today. I'll check back tomorrow and add some details, if
anyone's interested.
 
G

geographika

I came across this post looking to do the same thing. I also wrote VBA code to associate shapes with entities - probably along the same lines, of parsing the text. It's not pretty but it works..

http://geographika.co.uk/?p=78



victorcamp wrote:

Re: VBA Doorway to Database Properties
06-Jul-08

OK, I've got the cross-reference table between Entity Shapes and Database
Tables using VBA, though getting there was a bit clumsy

I'm burnt out for today. I'll check back tomorrow and add some details, if
anyone's interested.

EggHeadCafe - Software Developer Portal of Choice
Web access to EnterpriseDB with Data Access Pages
http://www.eggheadcafe.com/tutorial...e-f3e625e35771/web-access-to-enterprised.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top