DoDragDrop on modified master shapes has strange side-effect


    Sponsored Links


  • 1. visio 2003 - doors don't automatically align to walls
    I've got a set of drawings I've created for our various builds and lately I've noticed that the doors don't automatically align to the walls. Has anyone else experienced this or something similar. Any suggestions to resolve my problem?
  • 2. Changing the Fill color based on a user variable
    I setup a user variable (user.changecolor). I loaded this variable in the Line Format : LineColor cell and the Fill Format: FillForegnd cell for a test box I created. The line color of my test box changes depending on the value of user.changecolor. However, i am not able to get the fill color of my test box to change colors. The fill color changes if i manually enter a number into the FillForegnd cell, but not when I place the variable in the cell. I have tried several combinations it doesn't seem to work. Any known problems on changing the fill color based on a variable?
  • 3. publishng visio on web
    am using right click (format/behavior) to add details to visio objects (org chart objects with information about their roles and responsibilities). cannot get this method to work on a visio web page. Is it possible? Is there such a thing as a visio server that would make advanced methods that run with the visio client also work on a visio server?
  • 4. VISIO CommandBar EVENTS
    hi every body... is there any events to know the toolbar visible or not . i made a command bar CUSTOMEDIT.. and in a menu i want to visible and invisble. when the commandbar is visible it willbe checked and viceversa. i have done this part But when i click through visio VIEW-> TOOLBARS-> CUSTOMEDIT . the command bar is invisble but i can not unchecked my menu toolbar buton . how can i do this...???
  • 5. How to get rid of stencil window on left in drawing control?
    What is it actually called? I can get rid of the Shape Search like this: Visio.Window winShapeSearch = axDrawingControl1.Window.Windows.get_ItemFromID((int)Visio.VisWinTypes.visWinIDShapeSearch); winShapeSearch.Visible = false; but I can't get rid of the actual stencils/shapes. My users will have no need to be dropping shapes onto the P&ID I just want to display the drawing, I can hide it of course after the application starts by clicking on it. How can I do it during the form load?

DoDragDrop on modified master shapes has strange side-effect

Postby w4VrZQ » Tue, 20 Jun 2006 23:07:03 GMT

The scenario is the following:

I have a tree which I drag shapes from. When dragging the item, i find its 
corresponding master in the document stencil (via doc.Masters.get_ItemU) and 
DoDragDrop(foundMaster, DragDropEffects.Copy) on the master shape I get.

After doing this a couple of times (and it works as it should) i edit (in 
visio) the master shape in the document stencil. After updating all 
references i try dragging another one in from my tree. The dragged object 
looks fine, but when releasing/dropping the shape on the drawing surface, the 
text is renamed to what it was before, and another master is created in the 
document stencil.

Why is this happening? My code find the correct master since the text is 
correct when dragging the item without releasing it... But Visio does 
something when i release it. I know that the UniqueID changes when editing 
the text, but should this really be a problem?

If i edit the master in the document stencil before doing any drag-and-drop 
operation, then drag-and-drop works (no change of text and no new master 
shape), but immediately after editing the master, it starts acting weird!

Dragging the master from the document stencil works fine in every case.

Another thing:
I have also noticed that the icon when my drag-and-drop operation is going 
on, is more like in windows explorer, but when using the document stencil 
it's only a small 'plus' sign. What is the difference?.. How can I access 
Visios internal drag-and-drop functionality?

RE: DoDragDrop on modified master shapes has strange side-effect

Postby SnVuZVRoZVNlY29uZA » Wed, 21 Jun 2006 09:11:02 GMT

Though I do not know the detailed mechnism, Visio knows that you changed
the instance that you have droped from the stencil to your document page.
Visio knows changed master is not equal to the another master that you
have dropped next.


Re: DoDragDrop on modified master shapes has strange side-effect

Postby Mark Nelson [MS] » Wed, 21 Jun 2006 13:56:57 GMT

Here's an overview of this from a Visio perspective:

Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Re: DoDragDrop on modified master shapes has strange side-effect

Postby w4VrZQ » Wed, 21 Jun 2006 19:44:01 GMT

I suspected that it had to do with the UniqueID changing... It still seems 
that there is some caching done which makes Visio reload old information from 
the saved stencil instead of taking the edited master.

However: Enabling MatchByName for the master in the document stencil solved 
the problem. It now loads the correct master.

Do you know if it matches by 'Name' or 'NameU' (universal name) ?

Thanks for the link to the overview!

Similar Threads:

1.Modified Shape Masters have funny effect on Text Placement

I've modified a couple of master shapes by adding some lines and connection 
points.  if i just add connection points, i don't run into this problem.  But 
if I modify the drawing presentation by adding lines or curves, the text no 
longer goes into the normal text location.  Instead it opens a new textbox 
right in the middle of the object with a different format.

I can get to the normal text location by clicking repeatedly until it's 
chosen as a sub-object, but I assume there's a way for me to tell Visio that 
the "old" default text location/object should *still* be the default text 
location object.

Can someone tell me how I can accomplish this?  I don't seem to have the 
right vocabulary to find it using search terms.

Thanks in advance.

2.Modify a shape master and update all the shapes on the visio p

3.Modify a shape master and update all the shapes on the visio pages

my problem is the following:
1) I create a new shape master
2) I use it many times in a one or more visio pages
3) then when I make a modification on the shape master I would automatically 
update all the shapes on the visio pages I used before; is that possibile? 
Please, help me!

4.Effect of having "no active layer" when adding objects

Using 2003

What is the effect of not assigning shapes, when created, to a layer?
Or what is the problem of not flagging a layer as active when adding

Up until now I have not used layers.  Reviewing my previous work, I see
that the connectors seem to be on a layer (not active) and the same
with flowchart items.

I now realize that I can assign the various shapes to a layer.  That
said, are all non-assigned connectors and shapes - essentially on both
the "connectors" and the "flowchart" layers?

I hope that I my questions are clear.


5.No Side Effect snge msvebtfkz

6. Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

7. Modifying masters in a stencil

8. Modify selection of masters in stencil?

Return to VISIO


Who is online

Users browsing this forum: No registered users and 65 guest