Change shape image dependent on database entry

Started by cotswolddave, September 22, 2008, 09:19:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cotswolddave

I used another tool called netViz where the image could be changed based on a database field. The need is for displaying a shape called server in a rack, but the actual image would depend on the model number. I don't want different shapes as I need to preserve the data structures, just a different image.
netviz is no longer available, so any help welcome

Visio Guy

Hey CDave,

NetViz is no longer available period, or just at your company? Looks like CA bought them...

Anyway, to load different images would require a bit of code. I don't think you can coerce the data-linking features of Visio to somehow swap-out images based on data. Visio shapes don't really have the notion of: "I'm a link to an image, here's my path, load me"

Although the OrgChart solution in Visio can import images into employee shapes. It may be possible that a part of the OrgChart code that could be bastardised for more general purposes? Most of the OrgChart solution is contained in what is called an 'add-on". And shapes can call parts of the add-on's functionality using the add-on name and some command-line-style arguments.

Maybe someone out there has played around with this?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Paul Herber

If the required shapes aren't too complicated or there aren't too many of them then you could put each shape into separate geometry sections and just enable the required one. There is a shape like this (Flowchart shapes) in the basic flowchart shapes stencil. Each geometry section can be enabled individually.

If there are a lot of complicated shapes this could generate a very large shape. This may or may not be a problem.


Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Visio Guy

Oh yes, this article might help--it kind of relates to what Paul is talking about:

Visio Film Strip Shapes: Hurray for Hollywood!
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Paul Herber

Crikey! Somebody knows what I'm talking about! Well, there's a novelty!



Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

aledlund

I ended up adding a separate table to the process (product data) that has the stencil, front master, rear master definitions. I then point my component record to the product to put the correct version into the rack. This has the added beauty of allowing me to keep the environmentals in the same record for site reporting (heat, power, voltage, etc.)
HTH
al