Visio Guy

Visio Guy Website & General Stuff => Data Visualization & General Graphics Topics => Topic started by: mattpell on November 03, 2014, 06:20:05 PM

Title: Data not from Excel file not refreshing properly
Post by: mattpell on November 03, 2014, 06:20:05 PM
Hello,

I am currently using an excel data sheet to link some data into my visio drawing.  The way I understand it once it is linked and I apply the data to certain shapes these shapes will be linked and any changes to the excel file will automatically update once i refresh the data in visio.  The problem is this isnt the case.  When i do change the excel file and hit refresh in visio it gives me error messages for every linked shape that had been altered.  Error message is as follows "The following shapes were linked to rows that were removed from the data source"  Then it lists them all below and you have the option to delete or keep the shapes with errors. 

I have not moved the excel file all I did was open it.change some data then save it.  then i hit refresh in visio and i keep having this error.  Any insight on this from the Visio world as to what I could be doing wrong.  Thanks for your time.

Cheers,
Matt
Title: Re: Data not from Excel file not refreshing properly
Post by: Yacine on November 04, 2014, 06:53:33 AM
Not sure, but it sounds like being an error with the ID.
Are the shapes linked by unique IDs? Did you alter the IDs in the excel file?
Title: Re: Data not from Excel file not refreshing properly
Post by: mattpell on November 04, 2014, 12:55:22 PM
the shapes themselves are simply red circles placed over top of valves on a P&ID drawing.  I'm not 100% sure how Visio labels them but it appears as they are placed visio gives the shapes a unique ID.  When I check the "linked shapes" menu in the external data window it appears all the shapes have a unique ID such as "Circle.65"  or "Isolation point.127". 

The data I then bring into these drawing is mainly just a tag number that is usually one or two digits.  This number corresponds to a list of all the valves required to be manipulated and once in awhile we take one valve out of the middle of a list and re-number the whole list. 

What I'd like to see is when we need to modify our list and it gets re-numbered that all the new numbers would update in the drawing and I would simply have to go in and remove the shape linked to whatever I removed.

Hope this helps explain my issue a little more.  It seems so simple on how it should work but I must be missing something here.  thanks again for your time.

Cheers,
Matt
Title: Re: Data not from Excel file not refreshing properly
Post by: Yacine on November 04, 2014, 06:30:04 PM
Hi Matt,
those "circle.65" designations show the name of the shape and it is unique to the shape on this one page.
This is not the ID of the DB connected to them.
You need an ID in the DB and it shouldn't be it's number, because you say that you renumber them.
Not sure where you get your data from, but if it was an AccessDB, then there are possibilities to generate automatic IDs (either randomly or sorted).
This way you can change the  number of the entity as you like, but the real ID behind stays unchanged and the entity / shape can still be identified.

Hope this makes sense for you.
Title: Re: Data not from Excel file not refreshing properly
Post by: mattpell on November 04, 2014, 06:43:21 PM
I kind of see what your saying.  So each of these data points in my list (in excel) have a unique text description. 

However I only want to see the numbers on my drawing.

So what you are saying is try and have the shapes linked with the unique text rather then the "tag number" since we do change the number but would never change the text really unless it is something that is being completely removed or added to the drawing.

I was under the assumption that in excel say in field A4 I would have simply the number '4'  this would correspond to a text descriptor. Say "3/4 Block valve upstream V-101".  I would link this onto a circle in my drawing highlighting the valve and with my custom data shape I built it would display '4' as requested with my data shape. 

Later I decide to add a valve to my list and I order it above valve '4'.  it then becomes the new '4' with its own unique text descriptor in excel.  Then i refresh the page and i want my old '4' to change to a '5' since that is the order it would have changed to in the excel file.

I'm not sure how to go about linking the shapes with the text descriptor attaching to the shape but the number being what is displayed.  Thanks again for your time i hope the scenario I described makes sense and helps you understand what I am try to accomplish a little better.
Title: Re: Data not from Excel file not refreshing properly
Post by: Yacine on November 04, 2014, 07:35:43 PM
My advice would be to add a column using a value, that you really will never change. Don't use a field that has a meaning otherwise. Because you may need to change this field.
When linking the shapes to your data, select this new column as ID.
Title: Re: Data not from Excel file not refreshing properly
Post by: mattpell on November 04, 2014, 07:49:07 PM
Aha!  thanks you so much youve been a huge help....

if only I would have read the last info page when adding data sources.  It mentions right there the unique ID you were talking about. All i did was switch it from the 'tag number' to the 'tag' which has a unique text description about the valve.  this never changes and therefore if i have to change numbers since the order of my list changes for whatever reason the page now updates correctly.

Thanks again for your huge help it makes so much sense now!