Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Amin on July 11, 2012, 08:36:30 AM

Title: Automatic filling data fields
Post by: Amin on July 11, 2012, 08:36:30 AM
Hello everybody,

I represent a processus on Visio 2010. 
I have to put in each task's data fields successors an predecessors of the task.
I want to know if it's possible to automatically fill the data field with the information on the connector between tasks.

Exemple:

(http://img15.hostingpics.net/pics/182659Process.png) (http://www.hostingpics.net/viewer.php?id=182659Process.png)

Thank you for your help.
Title: Re: Automatic filling data fields
Post by: Jumpy on July 11, 2012, 10:19:54 AM
It is possible to write VBA-Code that does what you want, either everytime a connection is made or (maybe easier) once in one pass when the drawing is done. Here are some articles that should get you started:

http://www.visguy.com/2009/04/22/analyze-connectivity-between-process-flows/

http://www.visguy.com/2009/04/08/path-analysis-in-visio/


Or if you wan't do do it the other way:

http://www.visguy.com/2009/07/13/automatically-number-connect-shapes-with-code/


hth Jumpy
Title: Re: Automatic filling data fields
Post by: Amin on July 11, 2012, 02:49:21 PM
Thank you for your help!

I managed to do what I wanted based on your usefull links.
I think this topic should be deplaced in the VBA forum

You will find my .vsd files in attachement with the VBA code.