A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Visio
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Custom shapes with special behaviour



 
 
Thread Tools Display Modes
  #11  
Old July 20th, 2009, 05:59 PM posted to microsoft.public.visio.general
Jac Tremblay
external usenet poster
 
Posts: 23
Default Custom shapes with special behaviour

Hi WapperDude,
I like your solution. I will check it out a bit more and come back with a
more complete answer as soon as I can.
Thanks.
--
Jac Tremblay


"WapperDude" wrote:

Just for the sake of having an optional way to do this, it is possible to do
it without grouping. The steps are basically the same as John indicated,
except you don't need to change the re-size mode, and you don't group. Let's
say the large rectangle has an ID =1, and small rectangle is ID=2.

Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*1

Select and open large reectangle shape sheet
Set LocPinX = width*0
Set LocPinY = height*1.

This gives the same functionality as the grouping technique bit now either
shape is selectable with a single click.

HTH
Wapperdude


"Jac Tremblay" wrote:

Hi John,
As I can see, there is not much I can do. Actually, I wanted a rectangular
shape with a small rectangle at the top left corner. That small one would
always be the same size and would stay at the top left corner of the big
rectangle no matter how the big one is resized.
I guess I will forget about my idea.
Thank you for your answer, it is very appreciated.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

Checkout this blog post:

http://blogs.msdn.com/visio/archive/...esizemode.aspx

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk


"Jac Tremblay" wrote in message
...
Hi,

I use Visio 2003 and 2007.

I want to know if it is possible to create a custom shape from two
rectangles (for example) grouped together and have only one rectangle be
resized when the custom shape is resized?

I do not want the user to have to ungroup the components to do the job.

Thanks for any help.
--
Jac Tremblay


  #12  
Old July 21st, 2009, 01:29 AM posted to microsoft.public.visio.general
John... Visio MVP
external usenet poster
 
Posts: 900
Default Custom shapes with special behaviour

You mention text in eiither rectangle. If you need multiple text blocks,
then you will need a group shape. A Visio shape can have only one text
block. Any shape that has multiple text blocks is a grouped shape.

You may want to consider entering custom properties in the main shape and
each shape can reference the appropriate custom property.

If you want a single text block, but that can appear in one of many
rectangles, this can be done with a single shape and the use of the Hide
Text cell.

John... Visio MVP

"Jac Tremblay" wrote in message
...
Hi John,
Sorry for the time I took to answer.
I really appreciate your comment and it is very useful. I checked the
links
you provided and I noticed there are a lot of informations I have to
master
before I go on with other interrogations.
In my solution, I would like to try to avoid VBA, but if it is needed, I
will not hesitate to use it.
I checked your answer, but there are a few drawbacks. One is that the user
can select the big rectangle in the group and resize it without resizing
the
group which leads to some other problems.
A second drawback is that the user cannot enter text in either rectangles.
Another one yet is that if I want to create a master form from that group,
it does not work properly at all. Of course, I did not have the time to
check
the creation of master forms. I certainly will in the next few days (I saw
the refencences in MSDN).
So that is it for now. Thanks again for your time, John.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

That's no problem to implement...

1) Draw your larger rectangle

2) Draw your smaller rectangle and position in the top left hand corner
of
the previous one

3) With your smaller rectangle selected, click Format / Behavior /
Reposition only (on the Behavior tab)

4) Click OK to close the dialog

5) Select both rectangles and click Shape / Grouping / Group

This takes care of the resizing issue. Now to make sure the small
rectangle
stays in the top left corner....

6) Sub-select the smaller rectangle (first click selects the group shape
and
second the sub-shape)

7) Click Window / Show ShapeSheet (see this post for more info:
http://visualsignals.typepad.co.uk/v...or-starte.html )

8) In the first section ('Shape Transform') change the following cells:

PinX = Sheet.3!Width*0
PinY = Sheet.3!Height*1
LocPinX = Width*0
LocPinY = Height*1

(Note the '3' in 'Sheet.3' above may be a different number for you - it's
refering to the group shape)

If you're interested in what all those Pin... things are then you might
want
to have a look at this link:

http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

Hope that helps

Best regards

John

PS - The other John is older (as an MVP) and wiser one


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
"Jac Tremblay" wrote in message
...
Hi John,
As I can see, there is not much I can do. Actually, I wanted a
rectangular
shape with a small rectangle at the top left corner. That small one
would
always be the same size and would stay at the top left corner of the
big
rectangle no matter how the big one is resized.
I guess I will forget about my idea.
Thank you for your answer, it is very appreciated.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

Checkout this blog post:

http://blogs.msdn.com/visio/archive/...esizemode.aspx

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk


"Jac Tremblay" wrote in message
...
Hi,

I use Visio 2003 and 2007.

I want to know if it is possible to create a custom shape from two
rectangles (for example) grouped together and have only one
rectangle
be
resized when the custom shape is resized?

I do not want the user to have to ungroup the components to do the
job.

Thanks for any help.
--
Jac Tremblay






  #13  
Old July 21st, 2009, 02:25 AM posted to microsoft.public.visio.general
Jac Tremblay
external usenet poster
 
Posts: 23
Default Custom shapes with special behaviour

Hi WapperDude,
I checked again your solution and find it very interesting. But if I place
that form on a stencil, instances created from it do not work the same way
the original did. The text cannot be edited any more. The repositioning are
ok though.
Another thing: the small rectangle in that solution is placed at the top
left corner of the big rectangle, inside of it. How should I modify the
formulas if I wanted the small rectangle to be outside the big one (the base
of it would be the top of the big rectangle)?
I will try to find the answer by myself in the mean time.
Thanks for comment and your time.
--
Jac Tremblay


"WapperDude" wrote:

Just for the sake of having an optional way to do this, it is possible to do
it without grouping. The steps are basically the same as John indicated,
except you don't need to change the re-size mode, and you don't group. Let's
say the large rectangle has an ID =1, and small rectangle is ID=2.

Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*1

Select and open large reectangle shape sheet
Set LocPinX = width*0
Set LocPinY = height*1.

This gives the same functionality as the grouping technique bit now either
shape is selectable with a single click.

HTH
Wapperdude


"Jac Tremblay" wrote:

Hi John,
As I can see, there is not much I can do. Actually, I wanted a rectangular
shape with a small rectangle at the top left corner. That small one would
always be the same size and would stay at the top left corner of the big
rectangle no matter how the big one is resized.
I guess I will forget about my idea.
Thank you for your answer, it is very appreciated.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

Checkout this blog post:

http://blogs.msdn.com/visio/archive/...esizemode.aspx

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk


"Jac Tremblay" wrote in message
...
Hi,

I use Visio 2003 and 2007.

I want to know if it is possible to create a custom shape from two
rectangles (for example) grouped together and have only one rectangle be
resized when the custom shape is resized?

I do not want the user to have to ungroup the components to do the job.

Thanks for any help.
--
Jac Tremblay


  #14  
Old July 21st, 2009, 02:59 AM posted to microsoft.public.visio.general
Jac Tremblay
external usenet poster
 
Posts: 23
Default Custom shapes with special behaviour

Hi Again WapperDude,
I found out how to position the small rectangle at the top of the big one.
All I have to do is:
Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*0
The rest is the same.
But my question is:
When I type the formula "= guard(sheet.1!PinX)", Visio changes it for "=
guard(Box!PinX)". Why?
Thanks
--
Jac Tremblay


"WapperDude" wrote:

Just for the sake of having an optional way to do this, it is possible to do
it without grouping. The steps are basically the same as John indicated,
except you don't need to change the re-size mode, and you don't group. Let's
say the large rectangle has an ID =1, and small rectangle is ID=2.

Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*1

Select and open large reectangle shape sheet
Set LocPinX = width*0
Set LocPinY = height*1.

This gives the same functionality as the grouping technique bit now either
shape is selectable with a single click.

HTH
Wapperdude


"Jac Tremblay" wrote:

Hi John,
As I can see, there is not much I can do. Actually, I wanted a rectangular
shape with a small rectangle at the top left corner. That small one would
always be the same size and would stay at the top left corner of the big
rectangle no matter how the big one is resized.
I guess I will forget about my idea.
Thank you for your answer, it is very appreciated.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

Checkout this blog post:

http://blogs.msdn.com/visio/archive/...esizemode.aspx

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk


"Jac Tremblay" wrote in message
...
Hi,

I use Visio 2003 and 2007.

I want to know if it is possible to create a custom shape from two
rectangles (for example) grouped together and have only one rectangle be
resized when the custom shape is resized?

I do not want the user to have to ungroup the components to do the job.

Thanks for any help.
--
Jac Tremblay


  #15  
Old July 21st, 2009, 04:15 AM posted to microsoft.public.visio.general
WapperDude
external usenet poster
 
Posts: 589
Default Custom shapes with special behaviour

Great! Glad you worked it out. If you want to see a "graphic" illustration
of PinX vs LocPinX, see Visio Guy's post:
http://www.visguy.com/shapes/visio-art/, and scroll down to find: Pin and
LocPin Illustration.

As far as the "box" thing, had you renamed the shape to box? Sometimes
Visio will pick up the new name of a shape and use it. It seems to be quite
inconsistent with regards to this. Also, you mentioned problems editting the
text. My guess is that you grouped the shapes and then placed them on a
stencil. So, when you drag them from the stencil to the drawing, you'll need
to double click as per one of John Goldsmith's replies.

As far as the "box" goes, did you create the rectange by dragging a shape
named box onto the page? It's unclear why/when Visio jumps from a "friendly"
name to a "sheet.id" name. Generally, you can always use the shape.id form.
Easiest way to get a shape identity is to menu bar Format Special. The
pop up form gives the names. But you have to have developer mode turned on:
http://www.visguy.com/2008/08/04/top...eveloper-mode/

HTH
Wapperdude



"Jac Tremblay" wrote:

Hi Again WapperDude,
I found out how to position the small rectangle at the top of the big one.
All I have to do is:
Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*0
The rest is the same.
But my question is:
When I type the formula "= guard(sheet.1!PinX)", Visio changes it for "=
guard(Box!PinX)". Why?
Thanks
--
Jac Tremblay


"WapperDude" wrote:

Just for the sake of having an optional way to do this, it is possible to do
it without grouping. The steps are basically the same as John indicated,
except you don't need to change the re-size mode, and you don't group. Let's
say the large rectangle has an ID =1, and small rectangle is ID=2.

Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*1

Select and open large reectangle shape sheet
Set LocPinX = width*0
Set LocPinY = height*1.

This gives the same functionality as the grouping technique bit now either
shape is selectable with a single click.

HTH
Wapperdude


"Jac Tremblay" wrote:

Hi John,
As I can see, there is not much I can do. Actually, I wanted a rectangular
shape with a small rectangle at the top left corner. That small one would
always be the same size and would stay at the top left corner of the big
rectangle no matter how the big one is resized.
I guess I will forget about my idea.
Thank you for your answer, it is very appreciated.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

Checkout this blog post:

http://blogs.msdn.com/visio/archive/...esizemode.aspx

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk


"Jac Tremblay" wrote in message
...
Hi,

I use Visio 2003 and 2007.

I want to know if it is possible to create a custom shape from two
rectangles (for example) grouped together and have only one rectangle be
resized when the custom shape is resized?

I do not want the user to have to ungroup the components to do the job.

Thanks for any help.
--
Jac Tremblay


  #16  
Old July 21st, 2009, 05:03 AM posted to microsoft.public.visio.general
John... Visio MVP
external usenet poster
 
Posts: 900
Default Custom shapes with special behaviour

Or Visio did it. When you drop a collection of shapes on a stencil, Visio
will group them.

John... Visio MVP



"WapperDude" wrote in message
...
Great! Glad you worked it out. If you want to see a "graphic"
illustration
of PinX vs LocPinX, see Visio Guy's post:
http://www.visguy.com/shapes/visio-art/, and scroll down to find: Pin and
LocPin Illustration.

As far as the "box" thing, had you renamed the shape to box? Sometimes
Visio will pick up the new name of a shape and use it. It seems to be
quite
inconsistent with regards to this. Also, you mentioned problems editting
the
text. My guess is that you grouped the shapes and then placed them on a
stencil. So, when you drag them from the stencil to the drawing, you'll
need
to double click as per one of John Goldsmith's replies.

As far as the "box" goes, did you create the rectange by dragging a shape
named box onto the page? It's unclear why/when Visio jumps from a
"friendly"
name to a "sheet.id" name. Generally, you can always use the shape.id
form.
Easiest way to get a shape identity is to menu bar Format Special.
The
pop up form gives the names. But you have to have developer mode turned
on:
http://www.visguy.com/2008/08/04/top...eveloper-mode/

HTH
Wapperdude



"Jac Tremblay" wrote:

Hi Again WapperDude,
I found out how to position the small rectangle at the top of the big
one.
All I have to do is:
Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*0
The rest is the same.
But my question is:
When I type the formula "= guard(sheet.1!PinX)", Visio changes it for "=
guard(Box!PinX)". Why?
Thanks
--
Jac Tremblay


"WapperDude" wrote:

Just for the sake of having an optional way to do this, it is possible
to do
it without grouping. The steps are basically the same as John
indicated,
except you don't need to change the re-size mode, and you don't group.
Let's
say the large rectangle has an ID =1, and small rectangle is ID=2.

Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*1

Select and open large reectangle shape sheet
Set LocPinX = width*0
Set LocPinY = height*1.

This gives the same functionality as the grouping technique bit now
either
shape is selectable with a single click.

HTH
Wapperdude


"Jac Tremblay" wrote:

Hi John,
As I can see, there is not much I can do. Actually, I wanted a
rectangular
shape with a small rectangle at the top left corner. That small one
would
always be the same size and would stay at the top left corner of the
big
rectangle no matter how the big one is resized.
I guess I will forget about my idea.
Thank you for your answer, it is very appreciated.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

Checkout this blog post:

http://blogs.msdn.com/visio/archive/...esizemode.aspx

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk


"Jac Tremblay" wrote in message
...
Hi,

I use Visio 2003 and 2007.

I want to know if it is possible to create a custom shape from
two
rectangles (for example) grouped together and have only one
rectangle be
resized when the custom shape is resized?

I do not want the user to have to ungroup the components to do
the job.

Thanks for any help.
--
Jac Tremblay




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.