Visio Database Integration

D

Dave

Is it possible to have text labels appear in my Visio diagram based on
records in a database?

IOW can I generate text labels (or other shapes) when I open a Visio diagram
by having it read from values in a recordset?

I would like to know if this is possible and if so if there is a tutorial or
example on hthe web that illustrates this functionality.

Thanks
Dave
 
C

Crack

Yes, via VBmacro encoding can be done

basic outline is as follows:

Sub Labels_to_shape ()
Dim "declarations"

set db = opendatabase( something.mdb)

set somerecordset = db.openrecordset("select labels from
something.mdb.......")

With somerecordset
.movefirst
While not eof

"Here you need to pass the selected recordset information to another
routine
"which will target a shape on a page and insert the info
"into a shapesheet cell of
"the targeted shape

.movenext
loop
.close
end with

db.close
end sub

essentially several fundamental activities need be performed via the macros

Selecting targeted information within a database based upon caveates.
Selecting targeted shapes within a Visio document based upon caveates.
Coupling the info to the targeted shape cell.
 
M

Mark Nelson [MS]

You might look at Tools > Add-ons > Run Add-on > Import Data. There is also
a handy add-on called Label Shapes that can help.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
X

xirx

Hi

As I got to know, it should be possible to link various attributes of a
shape to an external database. Among others, the database can be MS Access
or even just an Excel sheet.

The procedure of linking a shape in an existing drawing is described very
detailed at:

http://www.quepublishing.com/articles/article.asp?p=329051&seqNum=4&rl=1

However, I can't get it done... :-(

I am trying to link a shape in an existing drawing to data base, i.e. an
Excel File.

I do:

Tools->Add Ons->Viso Extras->Database Wizard
Next
Select "Link shapes to database records"
Next
Select "Shape(s) in a drawing"
Next
Select a Shape
Next
Select "Excel Files"
Next
Select an Excel File

Now, I get a box in which I am forced to choose a "table". But the selection
list shown is empty. When I try to create a "table" (whereas it is unclear
how the field I define relate to the shape I am going to link to the
external DB), I get an error message, only.

According to the description at

http://www.quepublishing.com/articles/article.asp?p=329051&seqNum=4&rl=1

I can't get beyond step 7, which is:

"7) Select your database file. Choosing a database object to connect to is
probably best left at the default settings; same with the object types.
Tables and Views should be checked already; Product Reorders should appear
in the Database Objects scroll list. Make sure it's highlighted. Leave the
Define Table button alone and click Next."

My issue is: The "Database Objects scroll list" is empty. I can't click
"Next"...

Any pointers? Any help is very much appriciated.

xirx.
 

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