Is it possible to detect wether a shape is just a text shape, with no geometry?

Started by RhesusMinus, January 28, 2011, 08:53:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RhesusMinus

I have created a group with 2 sub shapes. One is a rectangle, and one is a text. I need them to be separate.
However..I'm not able to programatically see the difference between the 2 sub shapes. They both have a GeometryCount of 1, and the rectangle CAN contain a text as well, so I can't just check the text property either.

How can I identify the text only shape?

THL

Paul Herber

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

RhesusMinus




Nikolay

Quote from: RhesusMinus on January 28, 2011, 08:53:13 AM
I have created a group with 2 sub shapes. One is a rectangle, and one is a text. I need them to be separate.
However..I'm not able to programatically see the difference between the 2 sub shapes. They both have a GeometryCount of 1, and the rectangle CAN contain a text as well, so I can't just check the text property either.

How can I identify the text only shape?

Hi,

Maybe if all you actually want to do is to identify the shapes, it might be a good idea to simply mark them beforehand?!
I mean, to tag the shapes you want to identify, e.g. tag the rectangle shape with a mark "rectangle", and the text shape with a mark "text".
So later you could simply look at the tag of the shape you are processing and tell what it is.

You could implement this marking using custom properties, user-defined cells, or even the (already fossilized?) Data1/Data2/Data3 shape attributes

Keep in mind that Visio provides powerful and easy to use tools to show text items on a shape nowadays, e.g. text fields, or data graphics were specifically designed for this.
You might want to check these out if you haven't done it yet!