Location of Magenta Vertex

G

Guy..L

Is there any way to retrieve which vertex is magenta during line or pencil
tool operations?

I've seen it referred to as "auto-edit-vertex". I'd like to piggy-back
another semantic off the magenta vertex.
 
P

Paul Herber

Is there any way to retrieve which vertex is magenta during line or pencil
tool operations?

I've seen it referred to as "auto-edit-vertex". I'd like to piggy-back
another semantic off the magenta vertex.

Well, I'm not afraid to ask. Am I alone in not understanding this?
Could you enlighten us, Guy?
 
G

Guy..L

No... I apologize for my terseness. I have an application that takes all
shapes and makes a layer for the original shapes and another layer for
segmentized facsimiles of the original shapes.

In one application mode, I hide the originals and allow edits to the
DrawPolyLined versions of those originals. My app automatically selects the
DrawLine Tool from the toolbar so that now all of the segmented shapes have
the familiar little green diamonds at each vertex.

This condition allows the user to click on one of the diamonds to make it a
nice magenta color. This is standard Visio behavior.

My question is, other than trapping for MouseDown (which I've now completed)
and doing a nearest neighbor search, can I find a quicker way to locate that
magenta vertex that they selected?

Thank you.


AlEdlund said:
it would appear our question is related to 3d visualization?
al
 
G

Guy..L

You know. I'd settle for knowing that one of the vertices has indeed been
selected. I'd hate to track a MouseDown that didn't select one of the
vertices. Is the magenta vertex a status I can interrogate via selection or
subselection?

Guy..L said:
No... I apologize for my terseness. I have an application that takes all
shapes and makes a layer for the original shapes and another layer for
segmentized facsimiles of the original shapes.

In one application mode, I hide the originals and allow edits to the
DrawPolyLined versions of those originals. My app automatically selects the
DrawLine Tool from the toolbar so that now all of the segmented shapes have
the familiar little green diamonds at each vertex.

This condition allows the user to click on one of the diamonds to make it a
nice magenta color. This is standard Visio behavior.

My question is, other than trapping for MouseDown (which I've now completed)
and doing a nearest neighbor search, can I find a quicker way to locate that
magenta vertex that they selected?

Thank you.
 
A

AlEdlund

SWAG, since what you are calling the "magenta vertex" AFAIK is the selected
object, then why not trap the selection changed event, which coincidentally
returns the list of selected objects.
al
 
D

David Parker

I think the "magenta vertex" is the currently selected vertex in Pencil Tool
mode.
I do not think that the selected vertex is available via code.
I don't know why Guy wants to get it ... if it is for movement, then perhaps
add a Control handle, then link the vertex X and Y to the Control.
 
G

Guy..L

I am trapping for selection changed. I see the event fired when all the
green diamonds are lit or unlit according to the placement of the mouse click.

The problem is that second click on the green diamonds which takes one of
them to magenta. No selection changed event fires for that.

I have two selection traps. Neither of these fire for the selection of a
magenta vertex (subselect?)

1)
EventList eventsA = app.EventList;
eventsA.AddAdvise((short)VisEventCodes.visEvtCodeWinSelChange, eventHandler,
"", "");

and
2)
this.surface.SelectionChanged += new
AxMicrosoft.Office.Interop.VisOcx.EVisOcx_SelectionChangedEventHandler(this.surface_SelectionChanged);

Should I be trapping selection on the shape itself in my search for magenta?
Whaddya think?

Thank you.
Guy
 
G

Guy..L

It is a useful semantic for the user to select one of the green vertices, see
that it has indeed been selected when it has turned magenta and then click
another application button that continues on with its business from the
magenta vertex.

After mulling it over some more, if the user does click away from the green
vertices, then the selection event fires and the current selection is
deselected, so the app needs to recover from users gone awry this way.

The only way to know the magenta vertex location is in fact to trap for
mouse down. And that actually makes sense given the prior paragraph.

One last question on this topic, in case anyone is still reading this
thread...

Is there any way to make those green diamonds bigger? They are page-scale
locked as is.

Guy


David Parker said:
I think the "magenta vertex" is the currently selected vertex in Pencil Tool
mode.
I do not think that the selected vertex is available via code.
I don't know why Guy wants to get it ... if it is for movement, then perhaps
add a Control handle, then link the vertex X and Y to the Control.
 
D

David Parker

I think that the mouse co-ordinates is the only way of calculating which
vertex is selected.
No, I don't think that you can change the size of the green diamonds.
 

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