link custom property with shape property

D

Dennis

Hi,

We want to use Visio as a prototyping tool for designing GUI windows.

I want to make a Visio template with shapesheet for the project so that they
can just drag&drop a default window from the shapesheet. With the shape I
want to set some custom properties, like window title. Now that's not a
problem by using a field in the shape's text.
I would also like to make the window size adjustable using custom
properties. Here's the problem, we use pixels to define width & height, not
mm (or any other unit which Visio does provide). It's not an option to set
the working unit to pixels.

My idea was to make a custom property for width and height and link these to
the actual size properties of the shape, using a certain ratio, which I can
calculate.

Is this possible? So when a designer adjusts the window size using a custom
property, the shape will actually resize to those dimesions using the
mentioned ratio with a formula?
So basicly, I want to link a custom property with geometric properties of
the shape.
 
C

Chris Roth [MVP]

Hi Dennis,

If you want to size the objects "by number only", you can set up something
like this:

Prop.Width = 1024
Prop.PixelsPerInch = 72

Width = GUARD( Prop.Width / Prop.PixelsPerInch )

GUARD will make it so that the users can't resize graphically. If you want
both "by number" and "by handle" sizing, then let me know. That's more
complicated, especially with the ratio...

--
Hope this helps,

Chris Roth
Visio MVP

More Visio shapes, articles, development info and pure diagramming fun at:
www.wanderkind.com/visio
 

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