Discard *automatic* repositioning of subshapes in a group

Started by Yacine, May 04, 2010, 05:46:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visio Guy

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

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

Yacine

Yacine

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

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

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
Yacine