Visio and VBA

I

ivan.sovic

hi,
i'm not sure if this is the right group to ask this question, but
thank you for all your help in advance!

i'm trying to determine if two visio shapes are of the same type...
could anyone please point me to what i need to compare to get that
answer?
(to explain more clearly, i'd like to count all of the shapes of the
same type (for instance number of transistors) on the sheet, but
amongst all the transistors there are also other shapes that are not
transistors. i have a referent shape (lets say that we know it's a
transisor) and all i need to do is to compare another shape to that
referent shape to see if they are of the same type)

thanks!


ivan
 
P

Paul Herber

hi,
i'm not sure if this is the right group to ask this question, but
thank you for all your help in advance!

i'm trying to determine if two visio shapes are of the same type...
could anyone please point me to what i need to compare to get that
answer?

You need to look at the shapes Master.Name or Master.NameU property.
 
I

ivan

You need to look at the shapes Master.Name or Master.NameU property.

up until now i did that actually, but when i try to access the master
of some objects i get an "object variable or with block variable not
set", so i wonder why that happens?
 
P

Paul Herber

up until now i did that actually, but when i try to access the master
of some objects i get an "object variable or with block variable not
set", so i wonder why that happens?

Yes, it's possible for some shapes to not have a Master property

1. shapes that have been created using the drawing tools rather than
from stencils.
2. grouped shapes
3. shapes that have been disconnected from their master

In each case, if the Master property is non-existent then use the
shapes Name or NameU.

You could use the Drawing Explorer to see whch shapes are grouped or
you could use our utilities
http://www.visio-utilities.sandrila.co.uk/
which can give a comprehensive report of all shapes on a page with
each shapes Master.Name and NameU as well as the Shape.Name and NameU

If shapes have been grouped then it might help to ungroup them.
 
I

ivan

Yes, it's possible for some shapes to not have a Master property

1. shapes that have been created using the drawing tools rather than
from stencils.
2. grouped shapes
3. shapes that have been disconnected from their master

In each case, if the Master property is non-existent then use the
shapes Name or NameU.

You could use the Drawing Explorer to see whch shapes are grouped or
you could use our utilitieshttp://www.visio-utilities.sandrila.co.uk/
which can give a comprehensive report of all shapes on a page with
each shapes Master.Name and NameU as well as the Shape.Name and NameU

If shapes have been grouped then it might help to ungroup them.

Thank you very much for your help!
This helps allot!


ivan
 

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