A shape's arbitrary contour?

T

Tiret Ohf D.

Hi,

I know how to make a shape multistate. How can I allow user change the
shape's contour by his wish without adding Multistate specification?
Say "standart" view for a shape is square, but user wants to view his
shape as rhombus (then as rectangle, then as triangle or even as
polygon) without losing that initial square's properties?

Thanks.

--T.
 
J

John Marshall, MVP

The usual way for setting up multistate shapes is to create a seperate
geometry shape for the square, rhombus, rectangle, triangle and then
polygon. The noshow cell for each geometry section is used to determine if
the shape is displayed. The cell would contain a formula that compared the
value of a custom property to a fixed value. For a regular polygon, the
custom poperty can have a range of values. Say, if the custom property is
greater than 100, the shape is a regular polygon and (the custom property
value - 97) is the number of side. (triangle - 100, square - 101, pentagon -
102 etc). The number of lines in the geometry must match the maximum number
allowed. The length of the lines would be controlled by the custom property
and the excess lines would have a length of zero. For a triangle, the first
three line segments would have a value, but the rest of the line segments in
the geometry secition would have a length of zero, so that the end point
established by the first three line segments is not changed (and should
match the starting point.) In the Geometry section the last line is easy, it
just points to the starting point to close the shape.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
Visio Wishlist http://www.mvps.org/visio/wish_list.htm
 
T

Tiret Ohf D.

Ok. If use multistate it means what I bound user to a set of possible
geometries: rectangle, square, triangle, regular poligon beforehand. It
will work until user decide to draw something that I was unable to
imagine, say, transgalactic nanotransfluxator (whatever it mean) in 2D.
The scenario: user draws a trajectory of Brown's movement for a
particle and then says: I want it to be the same type as the geometries
I drawn previously. That's why I am looking for a way of shape
properties (data) independence from its representation (view).

My current solution is tracking all user activities on page and to add
a "Set type..." Action to any single line of the user's drawing. When
user activates the menu he'll be able to add new custom properties
(from custom dialog) to the geometry on which the action triggered (and
delete old custom properties for the geometry). This approach works but
I still looking for a clearer conception.

Regards,

--T.
 
M

Mark Nelson [MS]

That sounds like a reasonable approach. There are similar actions
throughout Visio to make arbitrary shapes work in special ways.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top