Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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:

POLYLINE(1,1,2,3,Scratch.X1,Scratch.Y1)

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:

http://visualsignals.typepad.co.uk/vislog/2009/05/simple-visio-sparkline-implementation.html

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.