How to select Master

M

msergeo

How can I programmatically select a master in the stencil window? I want only
to select it, not to drop on the page.

I have tried Window.Select, but it reports bad object type when passed
master object as an argument....
 
D

David Parker [Visio MVP]

What do you want to do with it when you have selected it?

set mst = document.masters("A") will get it in code, but does not select it
in the UI
 
M

msergeo

Sorry for the misunderstanding. I need VISUALLY to select master. The program
already obtained the references to the correct master shape and the window
reference of the stencil window. I need to UI-select it, as a result of a
find function.


Hope this clarifies what the program needs to do.
--
Srdjan Mijanovic
INTOREL


David Parker said:
What do you want to do with it when you have selected it?

set mst = document.masters("A") will get it in code, but does not select it
in the UI
 
C

Chris Roth [ Visio MVP ]

Hmmm. It appears that SelectedMasters is a read-only property. I'm not sure
if you can do this.

Unless you are creating a training-app, I'm not sure why you need to do
this, if you have a reference to the Master object, you can do just about
anything.

Perhaps there's another way to accomplish whatever you are trying to do?

--

Hope this helps,

Chris Roth
Visio MVP


msergeo said:
Sorry for the misunderstanding. I need VISUALLY to select master. The
program
already obtained the references to the correct master shape and the window
reference of the stencil window. I need to UI-select it, as a result of a
find function.


Hope this clarifies what the program needs to do.
 
M

msergeo

OK, we're trying to make a SEARCH functionality for our own stencil. The
program should ask user for a keyword, then search through the stencils
(which are connected to the DB, BTW) and then visually select masters that
match the searched criteria. In case of multiple hits (e.g. multiple masters
fulfil the criteria), user would have "Find next" option (as when you search
the text). Please note that the criteria is based on the keyword search in
the database.

Once the master is selected (and visually scrolled into the view etc), it is
up to the user to use it (or not, depending on his wishes).

We got the searching part OK (this was easy), but the obstacle now is how to
select a master in the stencil.

And it would be appriciated that the solution works with Visio 2000 or
later. These are the constrains.
 
M

Mark Nelson [MS]

You probably would have to show your search results in a window that you pop
up. Then the user could drag from your window into the diagram.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Mark Nelson [MS]

Correct.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

Diana Galindo

I am looking for exactly the same functionality. Are you planning on adding
this function in a future MS Visio version ?

Thanks

Diana
 

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