Automatic chevron question

Started by pfontyn, August 15, 2011, 03:43:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pfontyn

I am trying to create a shape that I can link to another shape which would automatically create a number of items based on shape data. I ran across the Chevron smartshape and thought that it might very well do exactly the job I was looking to do.

I have been able to apply the chevron shape to a page and get it to parse a variable list field on a different shape to allocate the shapes properly, but when I try to create a master shape from the chevron, it stops working. I'm guessing that it's probably because visio creates another top level group above the existing one when I create a master, but I don't know enough about creating those types of shapes to be able to figure out how to get around it.  :(

As well, I would ideally be able to drag this new master shape that someone can help me with  8)  onto a page and link it to the control that contains the shape data so that I don't actually need to alter the shapesheet for the chevron to link the controls. Is that possible? Deriving the associated control's shape data? I was thinking of doing a data graphic, but that might be overkill.

Visio Guy

#1
Hi pfontyn,

It's been a while since I created the Automatic Chevron Process Shape, but I remember having problems creating a master out of it. If you just copy the shape from the drawing, it works fine. But putting in a master killed some ShapeSheet cell references that I never had time to fix...or to figure out why it was breaking.

I just tried creating a master out of the shape in Visio 2010, and dropping it on the page did in fact work. I have noticed that similar problems with other shapes that I was working on seem to have vanished in Visio 2010. I suspect that a bug or two was fixed by the MS engineers in the latest incarnation of the product.

Which version of Visio are you using?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

pfontyn

#2
Unfortunately, our company is still on 2007.  :(

Just out of curiosity, does anyone know if it works in 2007 if the master is created in 2010? I'm wondering if the problem is caused by creating the master or by using it.

Visio Guy

I just took a 2010 chevron master over to 2007 and it is still broken. The chevron segments show up as you type, ie: "a;b;c;d" gives you four segments, but the text on each bit doesn't update and still says Step 1, Step 2, Step 3, Step 4.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

pfontyn

I removed the group selection behavior for a copy of this that I had set up as a master and selected the first individual control in the list. When I go to the shapesheet and switch from formulas to values, User.txt is showing #VALUE! instead of the text that should be displayed.

I guess because it doesn't resolve an actual value and generates a reference error, the value for the TextFields doesn't get reset so that's why the previous text (Step 1) stays?

pfontyn

There is a function on the individual shapes (EVALCELL(Sheet.1!User.getItem,"index",User.index) ) that seems to be the source of the problem. When the automatic chevron control is dragged onto the page, the function doesn't seem to resolve the index. If I was to change the name of the user defined cell to somthing like User.itemIndex, or if I hard-code it in the function (EVALCELL(Sheet.1!User.getItem,"index",0 ) it works - until it's set up as a master again. The next time I drag the shape onto the page, I need to essentially re-set the cell again.

Would the issue be the EVALCELL function? Has anyone ever run across problems with that in 2007?

pfontyn

Ok - I believe that I have this working.

I renamed the User.txt field in the group to User.fullText just to ensure I didn't have any collisions - being new to Visio I'm not familiar enough with how the variable scoping actually works.

Then in each of the individual chevrons, I changed the User.txt to use the following instead of the EVALCELL function.
INDEX(User.itemIndex,Sheet.1!User.fullText,Sheet.1!Prop.sep). So at this point I am no longer using the EVALLCELL function or the getItem function that was created at the group level.

I've created a master out of the control, and it seems to work. I attached the stencil with the shape as a master if anyone wants to try it.

Now - does anyone have any pointers on how I would go about getting this to read shape data from a linked control? :)