The magic of the ampersand in actions
The ShapeSheet of a Visio shape is truly a powerful tool. The simple trick to perform several actions in 1 go is by adding an & to it. If you want to set the color of a shape and change the line weight at the same time you can combine this in the action.
The action-formula to change the fill color of a shape is
=SETF(GetRef(FillForegnd),RGB(0,0,255))
The action-formula to change the line weight of a shape is
=SETF(GetRef(LineWeight),5 pt)
You can combine this by just putting an & in between:
=SETF(GetRef(FillForegnd),RGB(0,0,255))&SETF(GetRef(LineWeight),5 pt)
Not just 2 actions
I'm not sure what the limit of combined actions is, but you can do more than 2 actions at the same click. Change color, line weight and line pattern can be done by adding an & to it. The formula is:
=SETF(GetRef(FillForegnd),RGB(0,0,255))&SETF(GetRef(LineWeight),5 pt)&SETF(GetRef(LinePattern),2)
Don't hold back on experimenting here. If you type the formula =SETF(GetRef(Line... will give you several options for which you can change the values in the ShapeSheet.
- Log in to post comments