Different line patterns in one shape?

Started by cookiejar, February 15, 2010, 10:45:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cookiejar

Hi all, is it possible to use different line weights/colors in one shape? I know I could draw several lines and group them. However, I also want to create a few control points to control the positions of the lines. Thanks in advance for ideas.

wapperdude

No, well, at least not that I'm aware of.  The line patterns, colors are global to the shape.  About all you can do by use of multiple geometry sections in the shapesheet is to turn lines on / off.

But, once you group your lines, you can add control points at the group level, and pust their positions down to the sub-shapes within the group. 

Wapperdude
Visio 2019 Pro

Jumpy

You could than add ShapeData Rows at the group level, too. And with the ShapeData you could control things like LineWight, -Pattern, -Color of individual lines inside the group without the need to subselect them everytime you want to change something.

vojo

to be clear, what I believe Jumpy is getting at is that you could have custom or user cells at the group level and each subshape (line) in the group can be tasked to use the right user cell.

Something like this in the group
user.horz = X
user.vert = Y
user.rtbend = Z
user.ltbend = A
etc

In subshape
   Determine the type
      (either by have a stencil of horz, vert, rtbend, ltbend and you lay out and group....then mary to group cells)
      (or using some inspection of the geometries or shape transform to figure out its a horz, vert, rtbend, ltbend)
   Have the check place the right stuff in the line or fill cells....something like Setf(getref(fillpattern), groupshape!user.horz)


Now if you have a lot to do....then might want to think about the following:
   Make a template
   on the page shapesheet... add  (using custom props allow you to tailor behavior by page without having to go into shapesheet  (eventdblclk = docmd(1312) will bring up props on a form)
       prop.horz
       prop.vert
       etc.
   when dropping a shape (from a stencil made to work in this template), shape picks up right personages
       for a vertical line shape....something like this in the event on drop cell   eventondrop = setf(getref(linefill), thepage!prop.vert)


This way...if you want to change the behavior of say vertical lines....update page cells (by double clicking page) and all vertical lines are updated.



cookiejar

Thanks for the replies. Somehow I can't seem to reference group level shape data from a subshape though. Here is what I want to achieve: I want to have a group level boolean value that controls the visibility of two lines in the group. In the two lines in question, I try to set Geometry1.NoShow to formula "Sheet.9!Prop.Front" where 9 is the ID for the group shape and "Front" is the property name. I'm sure the ID is correct because I have referenced its BeginX/BeginY in other fields. Any ideas? Thanks.

wapperdude

My apologies for asking the obvious, the prop.front is either "True" or "False", or "0" or "1"?  That's the only values "NoShow" understands.
Visio 2019 Pro

cookiejar

Yes, I defined it as a boolean. I'm getting an dialog asking me to input a formula. I'm using Visio 2010 RC.

vojo

I do just what you are doing ALL the time in 2003...dont know about 2010 bugs...but should be able to do that.

See below.....double click group....watch behavior

Jumpy

Quote from: cookiejar on February 16, 2010, 08:49:12 PM
Yes, I defined it as a boolean. I'm getting an dialog asking me to input a formula. I'm using Visio 2010 RC.

What dialog asks you to input a formula? You should only get a combobox where you can choose either True or False.
Have you tried a User cell, say User.Front, set its Value to True, and than reference it from the Sub-Shape. Just for experiment, to see, where the error may be?

cookiejar

vojo, your attachment works fine. I created a new shape and it seems to be working. Weird. Anyway, thanks a lot for all the replies.