EventDrop Capabilities

Started by MacGyver, July 23, 2012, 07:05:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MacGyver

I have a master in a stencil that I drop in a drawing.  I later update the master in the stencil and drop an instance  (of the updated master) into the same drawing.  Now I have two masters that are almost identical in my document master list.  I only want the most recent version of the master. 

Is it possible to use the event drop command to check if there are previous versions of the master in the drawing.  Ideally, if this happens to be the case, the previous version of the master would be updated with the latest version of the master (in the drawing masters) and the changes pushed to each shape in the drawing that references the master.  This would reduce drawing size as i wouldn't have multiple versions of roughly the same master in the drawing.

I know this is confusing, I'm struggling to explain it clearly but any help would be appreciated.

aledlund

As in most things, it's a little more complicated than that. The way it works is the first time you drop a master onto a page, a copy is made and placed in the document stencil, and then a copy of the document stencil is dropped onto the page (the original stays in the doc stencil). From then on every time you go to drop that master into the document, it's really the doc stencil that is dropped. Changing the master in the stencil (assuming the name stays the same) will not add the changes to the document. You have to clear the doc stencil to update the local copy of the master, and that does not change the existing iterations of it in the document.
al

MacGyver

So you are confirming the fact that there is no way to add capabilities to the Eventdrop portion of a master that would check to see if a master already exists in document master list with the same name? Or a way of messaging the user if the master being dropped results in
Quote from: aledlund on July 23, 2012, 08:56:37 PM
a copy [being] made and placed in the document stencil, and then a copy of the document stencil is dropped onto the page

aledlund

afaik the eventdrop happens when the copy is dropped onto the page, not when it is put into the document stencil. Visio by itself is not going to manage the version control that you want, you'll have to write custom code to do that.The problem is actually larger than that because there is no mechanism to track what documents the individual masters may have been placed in.
al

MacGyver

is there a way to update the document master as to align it with the current master shape in the stencil library so as in the document i would only have one version of the master shape? simply Editing the master in the dwg stencil and inserting the master from the stencil library may match the two versions but when i drop the shape from the stencil library, a second version of the shape is still created in the dwg stencil.

another question...
say in my stencil library I have a master PLUG, my dwg stencil has a master PLUG and PLUG.1 and PLUG.2 with insignificant differences between the three shapes

can i somehow merge these masters so that all shapes referencing any of the three PLUG masters in the dwg, will now reference only 1 master PLUG? Or do i simply need to write a macro to find these shapes, delete each individually, then replace with the most recent version of the shape? this would at least allow me to maintain only one master in the dwg mstr stencil.

aledlund

the final step in fact has the root of what you want to do, manage your shapes. You have to ask why you have so many versions of a single shape and how often you want to clean house with them.
al