Showing data graphics

J

jarlen

I am building a diagram from an excel sheet where each line in the sheet
creates a shape in my visio diagram, autoconnects the required connections,
and binds some data to the shape.
Then I've made a function so when I double-click a shape, all related
connections are shown/hidden (if they're invisible they're made visible and
vice versa) but I need to include the same (in)visibility method to my data
graphics.
Is it possible to programmatically create the data graphics (the standard
layouts will be fine) and add the graphics to the layer I also use to
show/hide the connection lines?
All the articles I've found regarding data graphics has been about adding or
editing it using the visio menus, but since the entire diagram is build by
macros I need a way to work with them programattically.
 
J

jarlen

Ok, I found a way to do this, not quite as I expected, since the output is
what I need it suits me fine.
I figured out how to make the datagraphics visible by just setting the
shape.datagraphic to a master with:
shape.datagraphic = ActiveDocument.Masters("DataGraphic.12")
But I can't seem to figure out the name of the "None" master, ie. the one
where no graphics is displayed. Hovering above it in the datagraphic window
says it's called "Ingen" (danish version) but my macro won't react to :
shape.datagraphic = ActiveDocument.Masters("Ingen")
 
J

jarlen

Ok, I figured it out. Apparantly you supposed to set your datagraphic =
Nothing, when you want it not to be displayed. Not sure how one is supposed
to know, but at least it works now.
 

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