CreateSelection method

S

Sergey Zamansky

Hi,
I use Visio ActiveX control in C++ application. In order to select all
shapes in a layer I call method as follows:
Visio::IVSelectionPtr pvsoSel =
pvsoPage->CreateSelection(Visio::visSelTypeByLayer,
Visio::visSelModeSkipSuper, "MyLayerName");

This call returns selection properly.

In order to select all shapes created from the same master I call the method
in the same manner:

Visio::IVSelectionPtr pvsoSel =
pvsoPage->CreateSelection(Visio::visSelTypeByMaster,
Visio::visSelModeSkipSuper, "MyMasterName");

However this call throws exception. What is wrong? What is the correct way
to select shapes of the same master in C++?



Thank you in advance,

Sergey.
 
H

Hin

Try using a master instance instead of master name.

Visio::IVSelectionPtr pvsoSel =
pvsoPage->CreateSelection(Visio::visSelTypeByMaster,
Visio::visSelModeSkipSuper, pvsoMas);

I'm surprised that giving a layer name (instead of instance) work,
as it's not mentioned in the Developer reference.
Or it's only for ActiveX control?
 

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