Author Topic: Discard *automatic* repositioning of subshapes in a group  (Read 16109 times)

0 Members and 1 Guest are viewing this topic.

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1734
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Discard *automatic* repositioning of subshapes in a group
« Reply #15 on: May 06, 2010, 02:20:06 AM »
The SETATREFEXPR is tricky. When you move the sub-shape by hand, the bit inside the parentheses will change, according to Visio's standard, proportional positioning inside a group. So: if I move a sub-shape so that it is all the way to the bottom, then this:

PinY = SETATREF(User.dy,SETATREFEVAL(SETATREFEXPR(Sheet.3!Height*0.9946)-Sheet.3!Height))+Sheet.3!Height

will change to this:

PinY = SETATREF(User.dy,SETATREFEVAL(SETATREFEXPR(Sheet.3!Height*0)-Sheet.3!Height))+Sheet.3!Height

and User.dy will be equal to minus the entire height of the group. But User.dy will be a number, not a formula. So the resulting PinY of the sub-shape will be "group height-what the group height was" = 0, until we change the height of the group.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

vojo

  • Hero Member
  • *****
  • Posts: 1657
Re: Discard *automatic* repositioning of subshapes in a group
« Reply #16 on: May 06, 2010, 09:14:21 AM »
so ever time I used this ftype of ormula on other shapes and such, the equation always stays....it does not replace it with numbers.

For example, this equation always stays (snap shape to isometric - actually 2:1 psuedo iso - reference via user.gridx).....never dissappears to a single raw number.
numbers in the middle changes...but formula stays

pinx=INT(SETATREFEXPR(93 mm)/User.gridx+0.5)*User.gridx

Are you suggesting the setatrefeval forces always to number...seems odd since could never update the formula in shape sheet....would have to fire blind all the time

Yacine

  • Hero Member
  • *****
  • Posts: 2923
Re: Discard *automatic* repositioning of subshapes in a group
« Reply #17 on: May 06, 2010, 10:51:34 AM »
I guess everyone here knows this classic, just in case...
http://blogs.msdn.com/visio/archive/2006/09/29/777101.aspx
Yacine

Yacine

  • Hero Member
  • *****
  • Posts: 2923
Re: Discard *automatic* repositioning of subshapes in a group
« Reply #18 on: May 10, 2010, 03:10:19 PM »
Hi Vojo,
been back to office today and I am very sorry to have to say: it works with visio 2003.
 ;) Cheers Yacine
Yacine

vojo

  • Hero Member
  • *****
  • Posts: 1657
Re: Discard *automatic* repositioning of subshapes in a group
« Reply #19 on: May 10, 2010, 03:18:15 PM »
not mine....shapes move in relation to container and overall scaling of container....tried several times.
Maybe I am missing what you are trying to accomplish (subshape stays fixed while container is moved or scaled).

I have not had a problem with 2003 pretty much ever.   Its not like google sketchup that crashes daily

Yacine

  • Hero Member
  • *****
  • Posts: 2923
Re: Discard *automatic* repositioning of subshapes in a group
« Reply #20 on: May 10, 2010, 03:21:49 PM »
That will remain one of the unsolved questions of humanity ;)

Joking apart, could you try putting the formula manually in a shape contained in a group?
EventXFMod = SETF(GetRef(PinX),GetVal(PinX))+SETF(GetRef(PinY),GetVal(PinY))

The sub-shape should
1. follow the group as the latter is moved
2. stay in place when the group is resized
« Last Edit: May 10, 2010, 03:28:10 PM by Yacine »
Yacine