Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: kiler40 on August 14, 2013, 05:09:04 AM

Title: "On drop" events
Post by: kiler40 on August 14, 2013, 05:09:04 AM
Hello everybody!

I`m trying to accomplish something.
I want to assign to a shape "on drop" event. But for the moment nothing happens
I want to drop a shape from a stencil, and the shape automatically to take the page width, and to go on bottom of the page (like footer, but a complex one)

So please - can anyone help ? :)
Title: Re: "On drop" events
Post by: Yacine on August 14, 2013, 06:45:24 AM
You are probably making a frame.
In the EventDrop cell you'll write a serie of "setf(getref(" statements, separated by "+".
The setf(getrefs will modify the width, height, pinx and piny cells.
You may also want to protect those cells by guard statements.
HTH, Y.
Title: Re: "On drop" events
Post by: kiler40 on August 14, 2013, 07:00:15 AM
Yes, this i have come to solution... but i`m using SETF()&SETF()&....
But how to find the bottom of the page :)

Thanks for the quick response
Title: Re: "On drop" events
Post by: Surrogate on August 14, 2013, 07:21:05 AM
Quote
EventDrop=SETF("width",ThePage!PageWidth)+SETF("piny",ThePage!PageHeight)+SETF("pinx",0 mm)
Title: Re: "On drop" events
Post by: kiler40 on August 14, 2013, 08:08:00 AM
Thank you. that worked. had to add the page margins por position, and to remove from width 2* pagemargin (because i have to printi it in the end :) )
But thanks.

I have another question, if i have one page in portrait and one page in landscape, if i do the same opraration to send the shape in the top of the page, for portrait works perfect, for landscape sends it in the position of portrait...
can this be fixed ?
Title: Re: "On drop" events
Post by: Surrogate on August 14, 2013, 08:46:49 AM
try this way please
Quote
=SETF("width","=guard(ThePage!PageWidth-ThePage!PageLeftMargin-ThePage!PageRightMargin)")+SETF("piny","=guard(ThePage!PageHeight-thepage!PageLeftMargin)")+SETF("pinx",ThePage!PageWidth*0.5)+SETF("LocPinX",Width/2)
Title: Re: "On drop" events
Post by: kiler40 on August 14, 2013, 09:03:08 AM
WOW :)
Thanks A LOT !