G
Guest
Thanks to this newsgroup and to judicious GOOGLE use, I was able to
figure out how to use Insert => Field => Custom Formula to
automagically display text based on a Shape's Custom Property.
But I needed to display five (5) Custom Properties. After much
exprimenting (and cursing and Diet Coke) I think I stumbled on a
workable solution:
After creating my (Grouped) Shape,and ensuring assigned Custom
Properties were just right, I used the TextBox Tool to create five (5)
separate text boxes, sized, and positioned them over the Shape. I then
used the Custom Formula trick in EACH text box to point to the
appropriate Custom Property (i.e., Shape.1!Prop.xxxx). The value of
the Custom Propoerty appears as desired. Next I select the entire
group of objects using the Select Tool and drawing a rectagle which
includes the undereslying Shape and the five (5) defined text boxes, I
drag it to the Stencil to create a new "Master".
(I found that if I tried to UNGROUP my shape, add the text boxes,
then re-GROUP everything, the shape's Custom Properties were
eliminated when I performed the UNGROUP, so there was nothing I could
use in the Custom Formula....)
I think I understand the importance of assigning the Custom Properties
to the Shape; when I reGROUP everything and drag it to the Stencil,
it seems to do the trick.
From then on, I can drag & drop the newly created Master, and the
Custom Properties pop-up as expected (according to the "Ask" and
"Hidden" property selections). And the Cusom Properties do appear to
apply to the instanced shape on the drawing (based on Property Sheet
inspection).
So everyhting is working as I wanted - AND IT SCARES ME! I feel like
I am missing something fundamental and want to check this approach
before I use these stencils (I created several in the same manner) in
dozens of drawings. I don't want to find out down the line that this
was a stupid approach (even though it *seems* to work. As Jim Carey
shouted in "The Mask": "SOMEBODY STOP ME!"
I am darned lousy (dangerous,really) with VBA, so I was searchhing for
a solution using the standard interface elements without having to
learn VBA and the Visio object model. (I have experience dabbling in
Outlook's object model and VBA environment - and it is a very
frighteneing place to be....)
Thanks for any critical analysis of the above method! (In other
words, flames are OK - I can take it as long as I get a workable
solution out of this!)
/Cal/
cal*AT*oakharbor.net <--change the obvious....
figure out how to use Insert => Field => Custom Formula to
automagically display text based on a Shape's Custom Property.
But I needed to display five (5) Custom Properties. After much
exprimenting (and cursing and Diet Coke) I think I stumbled on a
workable solution:
After creating my (Grouped) Shape,and ensuring assigned Custom
Properties were just right, I used the TextBox Tool to create five (5)
separate text boxes, sized, and positioned them over the Shape. I then
used the Custom Formula trick in EACH text box to point to the
appropriate Custom Property (i.e., Shape.1!Prop.xxxx). The value of
the Custom Propoerty appears as desired. Next I select the entire
group of objects using the Select Tool and drawing a rectagle which
includes the undereslying Shape and the five (5) defined text boxes, I
drag it to the Stencil to create a new "Master".
(I found that if I tried to UNGROUP my shape, add the text boxes,
then re-GROUP everything, the shape's Custom Properties were
eliminated when I performed the UNGROUP, so there was nothing I could
use in the Custom Formula....)
I think I understand the importance of assigning the Custom Properties
to the Shape; when I reGROUP everything and drag it to the Stencil,
it seems to do the trick.
From then on, I can drag & drop the newly created Master, and the
Custom Properties pop-up as expected (according to the "Ask" and
"Hidden" property selections). And the Cusom Properties do appear to
apply to the instanced shape on the drawing (based on Property Sheet
inspection).
So everyhting is working as I wanted - AND IT SCARES ME! I feel like
I am missing something fundamental and want to check this approach
before I use these stencils (I created several in the same manner) in
dozens of drawings. I don't want to find out down the line that this
was a stupid approach (even though it *seems* to work. As Jim Carey
shouted in "The Mask": "SOMEBODY STOP ME!"
I am darned lousy (dangerous,really) with VBA, so I was searchhing for
a solution using the standard interface elements without having to
learn VBA and the Visio object model. (I have experience dabbling in
Outlook's object model and VBA environment - and it is a very
frighteneing place to be....)
Thanks for any critical analysis of the above method! (In other
words, flames are OK - I can take it as long as I get a workable
solution out of this!)
/Cal/
cal*AT*oakharbor.net <--change the obvious....