Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to design a Visio 2010 shape whose geometry depends on the shape's width. That is, the number and the length of the segments that make up the shape's geometry depends on the width.

Instead of creating a LineTo row (in the geometry section of the ShapeSheet) for each segment, I was thinking of calling the POLYLINE function from a PolyLineTo row. Is there a way to use a list of coordinates that comes from another cell with this function, e.g.:

POLYLINE(1, 1, Scratch.A1)

I've tried this with a coordinates list in the form of a string in Scratch.A1 ("5mm, 0mm, 5mm, 5mm"), but that doesn't seem to work.

share|improve this question

I do not believe this (having multiple values in cell) is supported.

I believe your only alternative it to use multiple cells to hold each X and Y

For example:


This, of course, is more complicated that using multiple LineTo rows.

share|improve this answer

One approach I've used in the past is to dynamically build the entire POLYLINE formula as a string and push it into your target cell as required. Have a look at the following post where I built a Sparkline shape using this technique:

share|improve this answer
Nice. Would it help to spell it out a bit more? Looks like your technique is to build a formula for the polyline as User.PolySet =DEPENDSON(Scratch.B12)+SETF(GetRef(Geometry2.A2),"=POLYLINE("&Scratch.B12&")")‌​. Can you elaborate on where Scratch.B12 gets its value? – minopret Feb 18 '13 at 17:00
The sparkline shape in the above post supports up to 12 points, which the user can enter as an array of values in the shape data window. There's a scratch row for each one of these values. Column A decides whether to include the respective row. If that's true then column B is just a concatenation of the calculated xy values from columns C and D. So Scratch.B12 is the final concatenated result. In fact you don't really need that DEPENDSON function as there's already a cell dependency (Scratch.B12) in the formula and the SETF will be fired every time Scratch.B12 changes. – JohnGoldsmith Feb 18 '13 at 18:32
In terms of the original question the point is that it's up to you on what basis you create your string, just as long as you push the entire formula in at the end. – JohnGoldsmith Feb 18 '13 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .