Discussion:
Getting to user typed name of shape
(too old to reply)
Mdev
2006-11-01 14:59:02 UTC
Permalink
Hi,

I'm new to the shapesheet stuff and building an app in VB.NET

If you drag a Basic Flowchart shapes "Process" onto the map, then type in a
name, say "MyProcess":

1) How do you access the shapesheet and name the user types in
(programatically)?
2) Is this universal?

I've noticed some shapes put in a "User.Title", some put it into a "text"
property etc.. Doesn't seem to be consistent.

Any good advice?

Thanks in advance,
MDev
Al Edlund
2006-11-01 15:25:58 UTC
Permalink
well for a start are you capturing events in your vb.net application? Do you
capture the document shapeadded event? You might start there.
al
Post by Mdev
Hi,
I'm new to the shapesheet stuff and building an app in VB.NET
If you drag a Basic Flowchart shapes "Process" onto the map, then type in a
1) How do you access the shapesheet and name the user types in
(programatically)?
2) Is this universal?
I've noticed some shapes put in a "User.Title", some put it into a "text"
property etc.. Doesn't seem to be consistent.
Any good advice?
Thanks in advance,
MDev
Mdev
2006-11-01 15:35:02 UTC
Permalink
No, it needs to be accessed at any given time, not just when shapes are
added.(i.e. on an already existing map)
Post by Al Edlund
well for a start are you capturing events in your vb.net application? Do you
capture the document shapeadded event? You might start there.
al
Post by Mdev
Hi,
I'm new to the shapesheet stuff and building an app in VB.NET
If you drag a Basic Flowchart shapes "Process" onto the map, then type in a
1) How do you access the shapesheet and name the user types in
(programatically)?
2) Is this universal?
I've noticed some shapes put in a "User.Title", some put it into a "text"
property etc.. Doesn't seem to be consistent.
Any good advice?
Thanks in advance,
MDev
Al Edlund
2006-11-01 16:42:26 UTC
Permalink
then you can monitor for shapechanged, cellchanged, or formulachanged and
get it from there.
al
Post by Mdev
No, it needs to be accessed at any given time, not just when shapes are
added.(i.e. on an already existing map)
Post by Al Edlund
well for a start are you capturing events in your vb.net application? Do you
capture the document shapeadded event? You might start there.
al
Post by Mdev
Hi,
I'm new to the shapesheet stuff and building an app in VB.NET
If you drag a Basic Flowchart shapes "Process" onto the map, then type
in
a
1) How do you access the shapesheet and name the user types in
(programatically)?
2) Is this universal?
I've noticed some shapes put in a "User.Title", some put it into a "text"
property etc.. Doesn't seem to be consistent.
Any good advice?
Thanks in advance,
MDev
Mdev
2006-11-02 12:10:02 UTC
Permalink
This doesn't really help or answer the two original questions. But thanks
anyway.
Post by Al Edlund
then you can monitor for shapechanged, cellchanged, or formulachanged and
get it from there.
al
Post by Mdev
No, it needs to be accessed at any given time, not just when shapes are
added.(i.e. on an already existing map)
Post by Al Edlund
well for a start are you capturing events in your vb.net application? Do you
capture the document shapeadded event? You might start there.
al
Post by Mdev
Hi,
I'm new to the shapesheet stuff and building an app in VB.NET
If you drag a Basic Flowchart shapes "Process" onto the map, then type
in
a
1) How do you access the shapesheet and name the user types in
(programatically)?
2) Is this universal?
I've noticed some shapes put in a "User.Title", some put it into a "text"
property etc.. Doesn't seem to be consistent.
Any good advice?
Thanks in advance,
MDev
David Parker
2006-11-02 14:38:07 UTC
Permalink
The default double-click behaviour for a shape is to go into text edit
=OPENTEXTWIN()
but if you have Shape Data (nee Custom Properties) then you may want to
change EventDblClick cell to =DOCMD(1312) which brings up the Shape Data
dialog.
You also may want to prevent editing of the shape text by changing
LockTextEdit to 1, becasue you may also want to use the Label Shapes...
add-on (under Building Plan) to have upto 4 Shape Data items in the shape
text.

If the above doesn't answer your question then perhaps this does:

A Shape is found in the Shapes collection of a Page which is a member of the
Pages collection of the ActiveDocument
If you have a Shape selected in Visio, then in code it will be the
ActiveWindow.Selection.PrimaryItem
The text that is displayed in a Shape is Shape.Text, but if the Text
includes field references then use Shape.Characters.Text
All Shapes have a unique Index, ID and Name in the collection, and
optionally a globally UniqueID
Post by Mdev
This doesn't really help or answer the two original questions. But thanks
anyway.
Post by Al Edlund
then you can monitor for shapechanged, cellchanged, or formulachanged and
get it from there.
al
Post by Mdev
No, it needs to be accessed at any given time, not just when shapes are
added.(i.e. on an already existing map)
Post by Al Edlund
well for a start are you capturing events in your vb.net application?
Do
you
capture the document shapeadded event? You might start there.
al
Post by Mdev
Hi,
I'm new to the shapesheet stuff and building an app in VB.NET
If you drag a Basic Flowchart shapes "Process" onto the map, then type
in
a
1) How do you access the shapesheet and name the user types in
(programatically)?
2) Is this universal?
I've noticed some shapes put in a "User.Title", some put it into a "text"
property etc.. Doesn't seem to be consistent.
Any good advice?
Thanks in advance,
MDev
Loading...