Author Topic: Auto positioning?  (Read 4633 times)

0 Members and 1 Guest are viewing this topic.

visiorookie

  • Newbie
  • *
  • Posts: 2
Auto positioning?
« on: July 16, 2008, 06: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?

Lars-Erik

  • Sr. Member
  • ****
  • Posts: 278
Re: Auto positioning?
« Reply #1 on: July 16, 2008, 09:29:56 AM »
You will have to be a little more specific on what you want to do, what the end result should look like.

- Lars

visiorookie

  • Newbie
  • *
  • Posts: 2
Re: Auto positioning?
« Reply #2 on: July 17, 2008, 05: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.

Lars-Erik

  • Sr. Member
  • ****
  • Posts: 278
Re: Auto positioning?
« Reply #3 on: July 17, 2008, 05: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

vojo

  • Hero Member
  • *****
  • Posts: 1515
Re: Auto positioning?
« Reply #4 on: July 17, 2008, 09:20:40 AM »
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.