What difference between PageWidth and Width in PageSheet

J

Jerry

When I set the formula in PageSheet
PageWidth --> 210 mm (A4 Size, OK)
Width --> 25.4 mm (I don't understand why)
Height --> 25.4 mm (the same as Widht ??)
In theory, some value in pagesheet, such as xform or char, does not have the
significance, why the strange value is displayed?
 
J

JuneTheSecond

Hi,

I could not find the Width cell nor Height cell in the shape sheet of the
page.
But found them really exist , when I output in VBA code.
Debug.Print ActivePage.PageSheet.Cells("Width")

I assume Width and Height cells are not used, or used in internal in Visio
only.

--
Best Regards.

JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
 
J

Jerry

My visio document contains the width in shapesheet, I guess Visio inherit the
element from another page. Share my inference with you.
 
J

John... Visio MVP

Are you sure you are looking at a Page shapesheet? What name do you see for
the section that contains the Width and Height cells?

John... Visio MVP
 
J

Jerry

Yes, I'm sure that, In formula spreadsheet editor, I inputted ThePage!Width
returns the value. The page element contains a xform element, so I got the
value of width.
 
J

John... Visio MVP

Interesting. Before you mentioned that there is a significant difference
between ThePage!Width and PageWidth. This can be partially explained by
scaling
You had
PageWidth --> 210 mm (A4 Size, OK)
Width --> 25.4 mm (I don't understand why)
Height --> 25.4 mm (the same as Widht ??)
It looks like a 10:1 ratio. I know 254 mm is not 210mm, but it does account
for part of the difference. The other interesting thing is the value of
25.4. Visio's internal units are in inches and there are 25.4 mm to the
inch.

Can you send me a copy of your sample drawing so that I can come up with a
more palatable explanation? (e-mail address removed)

John... Visio MVP
 
J

John... Visio MVP

Okay, I have done some more playing. It seems ThePage!width returns 1 in.
while Thepage!pagewidth returns the correct width of the page. So use
PageWidth rather than Width.

John... Visio MVP
 
P

Paul Herber

When I set the formula in PageSheet
PageWidth --> 210 mm (A4 Size, OK)
Width --> 25.4 mm (I don't understand why)
Height --> 25.4 mm (the same as Widht ??)
In theory, some value in pagesheet, such as xform or char, does not have the
significance, why the strange value is displayed?

I can reproduce this.
Open a stencil for edit and double-click a shape.
Select the shape's page shapesheet and open the shapesheet.
Add two rows in the shape's shape data (custom properties)
set the formula in one to "=Pagewidth" and the other to "=Width".
The first cell will be set to the correct page width for that shape
and the second will be set to 25.4mm.
 
J

Jerry

Yep, the Microsoft Visio development team might be do some internal rule in
visio document
 

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