Discussion:
ForeignData image sizing relative to the overall shape
(too old to reply)
Aussie Susan
2008-05-14 04:18:01 UTC
Permalink
(Visio 2003).

From a previous project, I have a mechanism for linking two shapes that are
printed on separate Visio pages that end up being printed back-to-back. As I
move the shape on the obverse page around, so the corresponding shape on the
reverse side moves so that it will always line up correctly on the printed
version.

My manager likes this and asked if it could be used to print out some little
'cards' that could be laminated and slipped into our ID badge holders. The
original 'card' data comes from a Word table and I created the two initial
shapes by cutting the necessary parts of the table and using 'paste special'
to add them to Visio. I then used a macro to link the two shapes together as
described above.

My problem is that I cannot find any relationship between the size of the
displayed data (which I think is held in the ForeignData part of the shape)
and the size of the shape itself. As I resize the shape (using the standard
shape resizing handles), the contained image jumps in size, following the
size change for a while and then jumping to something close to its original
size again.

I have found that setting the 'width' cell to some small value (1mm in my
test case) causes it value to jump back out to something like the correct
size when do this interactively, but causes all sorts of problems when
performed from VBA code.

Sometimes - but not always - after I've edited some of the Foreign Image
Info cells, the behaviour changes with the image staying the same size and
being clipped by the shape edge. However, I can't see anything that is
different in the shapesheet cells that would explain the different behaviour.

Because of the linkage between the two shapes, I need to be able to
initially set the sizes to the largest of the two before I establish the
linkage formulae.

I'm finding that there is almost no documentation or other information about
the foreign data side of a shape (at least I can't find it using Google
etc.). Therefore:

1) can someone point me to any documentation on how the foreign data image
is sized in relation to the overall shape
2) how can this be manipulated using VBA (as I've said, interactive and VBA
methods seem to produce different affects and I'm guessing its because of some
(event?) processing that can occur interactively but not between VBA
statements)

One I have this part nailed, then all of the rest of the processing happens
very nicely (my macro duplicates the shapes and lays them out on a page so
that it can be printed).

Thanks

Susan
JuneTheSecond
2008-05-15 02:51:01 UTC
Permalink
I am sorry I could not read all text you posted.
So, my comment might not meet your question.
I suppose your question might be about the values
of the cells in the foreign image info section.

ImgWidth and ImgHeight might be clear.
ImgOffsetX and ImgOffsetY may be the point.
The value of ImgOffset is the ofset value
measured by the width of scaled image in the
shape frame not by the width of the frame.

If the value of ImgWidth is Width*0.25 and
value of ImgOffsetX is ImgWidth*1.5,
the image is just centered horizontally in
the frame.

Here is a good example to see the relation
of image and the valuse.
http://www.visio.jp/program/puzzle/index.html
--
JuneTheSecond

Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
Aussie Susan
2008-05-15 23:45:00 UTC
Permalink
June,

Thanks for the information and reference. I've tried to use Google to
translate it fom Japanese to English and I can see the link to download the
sample code. However, I think (again using Google to translate the page) I'm
being asked to register on the site before I can download the file. I'm
finding this too difficult, so I'll see what I can understand from the
translated text.

As for not seeing all of the text, I've often said "why use 3 words when 20
will do"!

Susan
Post by JuneTheSecond
I am sorry I could not read all text you posted.
So, my comment might not meet your question.
I suppose your question might be about the values
of the cells in the foreign image info section.
ImgWidth and ImgHeight might be clear.
ImgOffsetX and ImgOffsetY may be the point.
The value of ImgOffset is the ofset value
measured by the width of scaled image in the
shape frame not by the width of the frame.
If the value of ImgWidth is Width*0.25 and
value of ImgOffsetX is ImgWidth*1.5,
the image is just centered horizontally in
the frame.
Here is a good example to see the relation
of image and the valuse.
http://www.visio.jp/program/puzzle/index.html
--
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
Aussie Susan
2008-06-01 23:57:00 UTC
Permalink
June,

I'm getting nowhere (after being dragged off onto something else for a
while) with the Japanese page and I think I really need to see the example
code. Is there a copy of this somewhere that is accessible without the
Japanese text?

Thanks

Susan
Post by JuneTheSecond
I am sorry I could not read all text you posted.
So, my comment might not meet your question.
I suppose your question might be about the values
of the cells in the foreign image info section.
ImgWidth and ImgHeight might be clear.
ImgOffsetX and ImgOffsetY may be the point.
The value of ImgOffset is the ofset value
measured by the width of scaled image in the
shape frame not by the width of the frame.
If the value of ImgWidth is Width*0.25 and
value of ImgOffsetX is ImgWidth*1.5,
the image is just centered horizontally in
the frame.
Here is a good example to see the relation
of image and the valuse.
http://www.visio.jp/program/puzzle/index.html
--
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
JuneTheSecond
2008-06-02 07:24:00 UTC
Permalink
How would you like this page?
You can download sample drwing
at the bottom of this page.
http://www.prodigitall.narod.ru/articles/article23_en.html
Nice example!
--
JuneTheSecond

Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
Aussie Susan
2008-06-03 00:28:00 UTC
Permalink
Thank you - I'll have a look at it in a moment.

Susan
Post by JuneTheSecond
How would you like this page?
You can download sample drwing
at the bottom of this page.
http://www.prodigitall.narod.ru/articles/article23_en.html
Nice example!
--
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
Loading...