Author Topic: Adding multiple text fields at predefined locations  (Read 2293 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 2
Adding multiple text fields at predefined locations
« on: May 22, 2013, 01:52:05 AM »

This is the first time I post on your forum, so I apologize in advance if I’m posting my question in the wrong section, or if it has been discussed before.

Let me first try to explain what I'm trying to do by the giving following example. I’m want to create new master shapes in a stencil. One of those shapes would be an Ethernet switch. The shape basically shows all the ports in the device. I will be importing data from an external excel worksheet , then linking the data with the Ethernet switch shape by simply dragging one of the rows from the inserted Excel worksheet into the shape. The data from the excel sheet would include the name of the devices connected to each of the Ethernet switch ports. Once the data link is established (by the simple drag and drop), I want the names of the devices to appear automatically in front of each port (predefined locations).

I have tried many different ways to accomplish this but i never got what I’m exactly looking for. The following are the two solutions i was able to find:

1) when creating the master shape of the Ethernet switch, i defined 16 shape data (for 16 ports) using 'define shape data'.    Then, in the shape text block, i add fields of data as follows (Insert->field->Category: Shape data->then I selected the ports one at a time). The limitation in this method is that once the data link is established, the names of the 16 ports will appear next to each other in the shape text box only and not in front of the ports where they should be displayed. Is there a way to have more than one text block associated with the Ethernet switch shape? In that case I can add one data field in each text block and then place it in front of the associated port.

2) The other way is to use Data Graphic tool that can display each of the shape’s data as a text field/callout which can be repositioned to anywhere on the shape. The limitation in this method is that I have to add the text fields again every time I drag a new Ethernet master shape from the stencil. I would like those data fields to be somehow embedded into the master shape at predefined locations. Therefore, once the data link between the excel worksheet and the shape is established, the data fields will display the correct values at the correct locations.

I’m sorry for the long email, but I will highly appreciate your help on this. The edition I’m using is Microsoft Visio Premium 2010.

Many thanks.


  • Hero Member
  • *****
  • Posts: 1061
Re: Adding multiple text fields at predefined locations
« Reply #1 on: May 22, 2013, 10:13:47 AM »
Method 3)
If the Switch shape isn't already a grouped Shape, group it. The grouped Shape gets the ShapeData fields you need.
For each port add a text-Shape to the grouped shape, place one at each port.
Each textshape get's a User defined cell, for example User.MyData. Place a formula in that cell, that looks for the ShapeData info concerning the textfields port. For example: "=Sheet.123!Prop.InfoPort5", where Sheet.123 is the grouped shape.
In the text insert a field that displays that user defiend cell.
Save it in a stencil.


  • Newbie
  • *
  • Posts: 2
Re: Adding multiple text fields at predefined locations
« Reply #2 on: May 22, 2013, 12:59:11 PM »
Thank you Jumpy!! It worked exactly as I want. Thank you so much for your help. It is highly appreciated :)