Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: visiorookie on July 16, 2008, 11:15:25 AM

Title: Auto positioning?
Post by: visiorookie on July 16, 2008, 11:15:25 AM
Hi everybody,

I am comming up with a question about some basic stuff I guess (my handle says it all...).
Well, am trying to set an auto positioning for a frame-shape - how can I do this?
Title: Re: Auto positioning?
Post by: Lars-Erik on July 16, 2008, 02:29:56 PM
You will have to be a little more specific on what you want to do, what the end result should look like.

- Lars
Title: Re: Auto positioning?
Post by: visiorookie on July 17, 2008, 10:30:28 AM
Thanks for the reply.
The end result should be that I pull a shape onto my sheet and then it should jump in a predestinated position.
Title: Re: Auto positioning?
Post by: Lars-Erik on July 17, 2008, 10:36:35 AM
You could do this with VBA. A shape can use the OnDrop event to call a macro.
Call("Macro") will call the macro and pass along the shape name.

Maybe this topic can help you:
http://visguy.com/vgforum/index.php?topic=196.0
Title: Re: Auto positioning?
Post by: vojo on July 17, 2008, 02:20:40 PM
if destination known/fixed....could use setatref(...) functions in pinx, piny.
Something like

      on drop =  setf(getref(user.dropflag),1)
      pinx = if(user.dropflag =1 , setatref(blah blah blah)+setf(getref(user.dropflag),0),)

this approach works for aligning a shape on drop on a given grid (i do it for isometric grids)
though it is somewhat simpler than this.