Greetings,
I have existing visio documents that contains the layout of various parking lots and their numbered parking spaces. My task is to add the person assigned to the parking space based on data in a SQL Server database.
This would be done in VS2010, using VB.Net.
I haven't done anything along these lines before, but I'm experienced in VB.Net, just not integrating the Visio side of it.
Any suggestions on where to start?
without seeing an example of the documents, it would be very hard.
al
For each of the labeled parking space - there is an employee name associated with it in a SQL server table, based on the spot name - for example - "A-01" is associated to "Bud Henderson".
---------------
A-10 Bud Henderson
---------------
A-11 Steve Smith
----------------
A-12 Byron Nelson
----------------
In the visio document, the names do not appear and that is the what I'm trying to accomplish, adding the names from the DB into the Visio document in the correct spot.
Attached is an image of one of the visio parking lots.
If you've Visio Professional available that could be done without any coding using the Datalink feature, to link shapedata to a database or an excel sheet.
Jon,
i'm aware of what a parking lot may look like, the request was for the visio file. Jumpy is correct in that the easiest method is to datalink using one of the Visio Pro versions (starting with 2007).
al
al - I took "without seeing" as something else. I've attached the diagram, but it looks like I may not need to worry about the code anyway.
Thanks for the suggestions. I will do some reading up on datalink and see if it meets my needs. If not, I'll be back.
Jon,
The parking spot 'name' is merely a text box, so linking the shape to a datarecordset is very simple. Just ensure that the record has the spot name in it so that you can create the link. (it's a link to text operation)
al
Thanks!
A question. How does it keep the visio diagram in synch with the data in the table? Would it refresh it when the document is opened?
Should be all in here:
http://office.microsoft.com/en-ca/visio-help/refresh-imported-data-HA010014271.aspx
There's also a video on Data Linking here that might help:
Dynamically Link Business Data to Shapes (https://www.youtube.com/watch?v=ZSeLZ0ip_oI)
from the 'MVP Sessions for Getting Started with Visio 2010 (http://blog.bvisual.net/2013/07/08/mvp-sessions-for-getting-started-with-visio-2010/)' series.
Best regards
John
Thanks for all the help. I will have to watch the YouTube video at home, since we cannot access that at work.
Well, the initial auto-linking is working, but refreshing the data after I've changed values in the database is not.
Any thoughts?
doing problem determination is a two step process, a.) verify that the recordset has been updated correctly b.) matching the record/recordset against the shapesheet data.
al