Dropping data-linked Title Block Masters

Started by mmulvenna, February 02, 2009, 05:19:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mmulvenna

I have a scaled drawing started from a template.
I want to drop an unscaled title block master shape onto the drawing.
Within the title block there are text fields that I want to update from a Database.

I can do this all in the drawing just fine.
  - Drop master shape
  - Link Data base
  - Insert fields into the text box

and it all works just fine.

My question is how do I do all of this in the master of the stencil so that it is all accomplished when I drop the master on the page?

When I edit the master for the stencil the LINK DB functions are greyed out.

Do I need to do this programmatically using data recordsets etc?

As always thanks for any help anyone can provide.

Mike



Visio Guy

#1
Hi Mike,

You mean you want to edit the master first, fill out the data, then drop it on several pages?

Are you stuck on the data linking or dropping, or what?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

mmulvenna

#2
I want the master to have the data links enabled so I dont have to do it everytime I drop the stencil.

I am beginning to think I have to do the link programatically after the shape is drop on the page.
Mike

Visio Guy

I think you can link the shape to data, then create a new master out of it and re-use it. I haven't actually done it, but I'm pretty sure that David Parker does this a lot and mentions it in his book.

You can also create Visio 2007 data links programmatically!
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

mmulvenna

Yes I have done that and the links do carry to the new master. The data source however does not.

Guess i will go the programatic route.

As always thanks

Visio Guy

OHHHHH! Your data source doesn't get yanked into new drawings, eh?

You could probably write it into the shape/master (if it isn't already -- I haven't looked at all the user-cells in a whille...)
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

mmulvenna


aledlund

as a note from the side
"Every Visio 2007 Document object has a DataRecordsets collection, which is empty until a connection is made to a data source" The association between the recordset and the datasource is stored in the document when the recordset is loaded. You might consider keeping the "load code" in the stencil with the master (a lot of benefits since the stencil can be handled as a document with associated docsheet to store attributes).
al

mmulvenna

Quote from: aledlund on February 02, 2009, 10:42:11 PM
as a note from the side
"Every Visio 2007 Document object has a DataRecordsets collection, which is empty until a connection is made to a data source" The association between the recordset and the datasource is stored in the document when the recordset is loaded. You might consider keeping the "load code" in the stencil with the master (a lot of benefits since the stencil can be handled as a document with associated docsheet to store attributes).
al


Thanks a lot, I was just looking at the DataRecordsets Collection, sounds like just what I need

mmulvenna

Quote from: mmulvenna on February 03, 2009, 12:58:32 AM
Quote from: aledlund on February 02, 2009, 10:42:11 PM
as a note from the side
"Every Visio 2007 Document object has a DataRecordsets collection, which is empty until a connection is made to a data source" The association between the recordset and the datasource is stored in the document when the recordset is loaded. You might consider keeping the "load code" in the stencil with the master (a lot of benefits since the stencil can be handled as a document with associated docsheet to store attributes).
al


Thanks a lot, I was just looking at the DataRecordsets Collection, sounds like just what I need


Update,

I found that the Data Base Wizard in the tools/add on/visio extras allows a data base to be linked to a master stencil. After a litlle playing with it, it works just fine without having to do any programming. ;D ;D ;D

Thanks to everyone for their suggestions.

Mike

wapperdude

Visio 2019 Pro