Is there a way to detect a specific Visio master used in any diagr

H

hellothere

Good morning everyone,

I'm creating a Visio add-on software in C#. I would like to read Visio
diagrams and recognize if the user have used a very specific master shape
that comes with Visio.

For example, I would like to be able to say: "Aha! the user have used 5
instances of the On-page reference shape." for a diagram draw in the US,
France or Australia.

By the way, I'm currently comparing a shape's master.NameU to a predefined
string like "On-page reference" for example. This works now, but I'm worried
about what will happen if the user uses another stencil that also has a shape
called exactly by that same name. I have also tried master.BaseID, but the
value of that property changes from one diagram to another, even for the same
master shape... :(


Help! Mayday, mayday! Any comments or answers will be greatly appreciated,
so I thank you in advance.


Have a nice week end!
 
J

JuneTheSecond

You might add a user defined section to the master shape and put a unique
note there to know where the shape comes from.
 
H

hellothere

Hi JuneTheSecond,

Thank you for the tip, I'll add such custom properties and sections to
masters of the stencil that I'm going to build.

However, I can't possibly ask every user to create such custom section in
every master's shapesheet before he drags and drops a shape from his library
of stencils. I mean, I need to find a property that is shared by, but unique
to, all
"Business Process" => "Basic Flowchart shapes" => "On-page reference" shape,
for anyone in the world.

Thanks again JuneTheSecond, I just hope someone knows if such property (or
anything equivalent) exists!
 

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