Share via

Visio: purging external reference data in Shape Data

Anonymous
2010-05-12T11:31:57+00:00

I have an org chart that is linked to an external data source. I delink the external data source. However, when I open the Shape Data window, there are fields from previously linked data sources. When I link to a new data source, the old Shape Data fields are not removed and block my ability to format new linked data. How do I purge the old Shape Data fields in the existing file? To test this, I created a new org chart. None of the old Link Data fields are present, and I can successfully format the new data on the new chart.

So ... after deleting a link to a data source, how to also remove the references to those fields in Shape Data. In other words, how to start "fresh" with an existing visio org chart?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-05-12T23:54:24+00:00

The step of creating links between the drawing and a data source adds individual Shape Data fields to each linked shape.  These are permanent fields, and do not disappear because the data links are removed, as you have noticed.

One option you can consider is to apply a Shape Data Set to the shapes in the drawing.  You can use a shape with the desired Shape Data fields defined (and without the extra fields) as a 'template' to create a Shape Data Set.  Then you can apply that Set to other shapes as needed in the same drawing.

The first step will be to capture a set from a normal Organization Chart drawing.  Launch a new, blank Org Chart and place a shape (such as Position or Manager) on the page.  Keep this drawing open while you open your existing drawing.  Then copy the 'clean' shape from the new drawing into the existing drawing.  You can then close the created blank drawing.

Select the copied shape, and View the Shape Data Window (View > Shape Data Window).  You should see the existing data fields expected in a clean Org Chart object.  To access the tools for managing Shape Data Sets, place your cursor in a part of the Shape Data Window that is below the fields.  (Note: you may have to resize it to accomplish this).  Right-click in this open area to see the options - and select the 'Shape Data Sets' option.

Make sure that your clean Org Chart shape is still selected in the drawing, and then select the "Add..." function in the Shape Data Sets window.  Type a name for the set (something like Org), and make sure that the option "Create a new set form the shape selected in Visio" is selected, and click OK.  This will create a set of data fields for use on other shapes.

Now that you have a set to use, select the shapes in your Org Chart diagram that you need to revert to basic fields.  You will probably NOT want to select connectors, so using the Shift-Click feature will be useful to multi-select boxes.  Also, you may want to move through the drawing in sections, rather than try to hit every shape on the page at once, but it is your choice.  Once you have some shapes selected and are ready, you can put a check mark next to the defined set "Org" (or whatever you named it) and choose to apply to "Shapes selected in drawing", then click Apply. 

Note: There is an option 'Remove existing data sets', which is normally on. This is a good feature, because you want Visio to essentially wipe the slate, and cleanly apply the set, without leaving other fields behind.

Once you have the drawing cleaned up, you may want to save it in Unlinked mode as a sort of template for later use :-)

Hope that helps!


Barb

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-08-11T16:18:54+00:00

    This doesn't work for me.  I'm using some 3rd Party shapes from Dell, Cisco, etc... in a rack diagram.  I want to apply a single, standardized data set to all the shapes in the diagram.  I can create a new Data Set that contains only the fields I want. 

    I am running into problems when I apply my custom data set.  The issue is that the "old" fields are still present, along with the "new fields" from my custom data set.  In other words, my new fields are simply appended to the old ones. 

    I have the "Remove Existing Data Sets" option checked....

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-11-17T17:44:45+00:00

    You can copy Shape Data Sets by copying a shape with a SD set applied to another drawing/template.  However, there isn't a way in the API to set a Shape Data set - that is a UI tool to help users accomplish the task, and not meant for automated scenarios.

    If you need to add Properties in a more automated manner, you will be better served by using the API.  There are some good examples in the SDK regarding adding and setting the values of Shape Data. 


    Barb

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-11-12T00:13:15+00:00

    Hi Barb,

    Thanks for posting that, it helped me as well.

    Is it possible to use the same Shape Data Sets across Visio files? I have several files that have the same shapes on them, and I need to make a change to the shape data set for multiple shapes across all files.

    I know you can copy from an existing data set in another file, but I was hoping for some way to point to the set on all files, so a change in one place propagates across all files.

    Thanks!

    Edit: I am using Visio 2010 Professional

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-05-13T07:44:50+00:00

    Thank you - very clear.

    Was this answer helpful?

    0 comments No comments