BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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
Get my Visio Book! Using Microsoft Visio 2010


so ever time I used this ftype of ormula on other shapes and such, the equation always 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




Hi Vojo,
been back to office today and I am very sorry to have to say: it works with visio 2003.
;) Cheers Yacine


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


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

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 242 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1093KB.
Tokens: post-login.
Cache hits: 13: 0.00113s for 26,767 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]