How can I determine that object is a line ?

Started by ivan, April 22, 2009, 11:58:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ivan

I got a macros for shape_added event. This macros replaces lines I draw with custom shape. But I only want it to work with lines. How can i determine that a shape is a line to stop macro's execution ?

Paul Herber

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

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

vojo

that wont always work.   Many advanced visio shapes will use 1D behavior on a group of shapes.   Works pretty effectively in a lego building block approach to building something bigger.

aledlund

you might consider a multi part test,
first is it           vsoShape.oned (a good start, but not always conclusive like vojo mentioned )
second            test Left(LCase(vsoShape.Master.NameU), 17) = "dynamic connector"
third test         vsoShape.ObjectType = visLOFlagsRoutable   (in case the master was renamed)

al

vojo

could just verify the following:
   beginx cell is present
   height is 0mm

Either not true...its not a line