how can i recognize changing a shape in visio?

D

David

i have a line on the frame in visio.
i want to do some actions when i change the position of the start
coordination of the line (drag the start point with the mouse).
i didn't see any shapeChange event. only shapeAdded. so how i can i
do it?

thanks
David
 
D

David

i have a line on the frame in visio.
i want to do some actions when i change the position of the start
coordination of the line (drag the start point with the mouse).
i didn't see any shapeChange event.  only shapeAdded.  so how i can i
do it?

thanks
David

and also, how can i recognize changing the properties (for example
changing the value of "Begin X")?
 
D

David Parker

You need FormulaChanged event, and filter for the particlar cells you want

i have a line on the frame in visio.
i want to do some actions when i change the position of the start
coordination of the line (drag the start point with the mouse).
i didn't see any shapeChange event. only shapeAdded. so how i can i
do it?

thanks
David

and also, how can i recognize changing the properties (for example
changing the value of "Begin X")?
 
D

David

You need FormulaChanged event, and filter for the particlar cells you want





and also, how can i recognize changing the properties (for example
changing the value of "Begin X")?

there's no such event in my list. i have a list of all the events i
have in visio document (DocumentOpened, DocumentSaved, MasterAdded,
ShapeAdded, and many more) but there's no event FormulaChanged.
 
D

David Parker

Tht's because there are many different objects that can have events in
Visio.
You are just looking at the Document object, try searching for
FormulaChanged in the Object Browser for the VisioType library. You wll see
that there are 11 objects that raise this event.
Also read http://msdn.microsoft.com/en-us/library/aa201787(office.10).aspx

You need FormulaChanged event, and filter for the particlar cells you want





and also, how can i recognize changing the properties (for example
changing the value of "Begin X")?

there's no such event in my list. i have a list of all the events i
have in visio document (DocumentOpened, DocumentSaved, MasterAdded,
ShapeAdded, and many more) but there's no event FormulaChanged.
 
D

David

Tht's because there are many different objects that can have events in
Visio.
You are just looking at the Document object, try searching for
FormulaChanged in the Object Browser for the VisioType library.  You wll see
that there are 11 objects that raise this event.
Also readhttp://msdn.microsoft.com/en-us/library/aa201787(office.10).aspx






there's no such event in my list.  i have a list of all the events i
have in visio document (DocumentOpened, DocumentSaved, MasterAdded,
ShapeAdded, and many more) but there's no event FormulaChanged.

--
David Parker
Microsoft MVP (Visio)http://bvisual.spaces.live.comhttp://www.visualizinginformation.com- Hide quoted text -

- Show quoted text -

hi, thanks for the link.
i actually recorded a macro in visio and then opened VBA to look at
the code. the file is called ThisDocement and i can see there only
the document's events. how can i get the events of the other
objects? what is the Object Browser for the VisioType library?

and another question. how can i check for each action i make which
event it belongs to?

i'll read the link i'm just not sure it has the answers for the
questions above and after looking at it briefly i didn't find answers.
 
D

David Parker

Start here?:
http://visualsignals.typepad.co.uk/vislog/2007/10/just-for-starte.html

Tht's because there are many different objects that can have events in
Visio.
You are just looking at the Document object, try searching for
FormulaChanged in the Object Browser for the VisioType library. You wll
see
that there are 11 objects that raise this event.
Also readhttp://msdn.microsoft.com/en-us/library/aa201787(office.10).aspx






there's no such event in my list. i have a list of all the events i
have in visio document (DocumentOpened, DocumentSaved, MasterAdded,
ShapeAdded, and many more) but there's no event FormulaChanged.

--
David Parker
Microsoft MVP
(Visio)http://bvisual.spaces.live.comhttp://www.visualizinginformation.com-
Hide quoted text -

- Show quoted text -

hi, thanks for the link.
i actually recorded a macro in visio and then opened VBA to look at
the code. the file is called ThisDocement and i can see there only
the document's events. how can i get the events of the other
objects? what is the Object Browser for the VisioType library?

and another question. how can i check for each action i make which
event it belongs to?

i'll read the link i'm just not sure it has the answers for the
questions above and after looking at it briefly i didn't find answers.
 
D

David

Start here?:http://visualsignals.typepad.co.uk/vislog/2007/10/just-for-starte.html









hi, thanks for the link.
i actually recorded a macro in visio and then opened VBA to look at
the code.  the file is called ThisDocement and i can see there only
the document's events.  how can i get the events of the other
objects?  what is the Object Browser for the VisioType library?

and another question. how can i check for each action i make which
event it belongs to?

i'll read the link i'm just not sure it has the answers for the
questions above and after looking at it briefly i didn't find answers.

--
David Parker
Microsoft MVP (Visio)http://bvisual.spaces.live.comhttp://www.visualizinginformation.com- Hide quoted text -

- Show quoted text -

i found the event FormulaChanged in the object browser. but i didn't
succeed to add it to my project. if i right click it then the "View
Definition" option is dimmed so i don't know how to edit the event.
the same with the Shape class the event belongs to. i'd like to add
the shape class to my project together with all its events\methods\etc
in addion to ThisDocument class. can you show me how to do it?

thanks
David
 
D

David Parker

Have you read?:
http://msdn.microsoft.com/en-us/library/aa201789(office.10).aspx

If you are using VBA, then you'll probably need to declare an object
WithEvents, but use with care because too many will slow your app down. For
example, I found that even having just the stub for CellChanged dramatically
slows things down, even if there is no code inside the stub.

For serious programming, WithEvents is frowned on, and AddAdvice is
recommended instead.


Start
here?:http://visualsignals.typepad.co.uk/vislog/2007/10/just-for-starte.html









hi, thanks for the link.
i actually recorded a macro in visio and then opened VBA to look at
the code. the file is called ThisDocement and i can see there only
the document's events. how can i get the events of the other
objects? what is the Object Browser for the VisioType library?

and another question. how can i check for each action i make which
event it belongs to?

i'll read the link i'm just not sure it has the answers for the
questions above and after looking at it briefly i didn't find answers.

--
David Parker
Microsoft MVP
(Visio)http://bvisual.spaces.live.comhttp://www.visualizinginformation.com-
Hide quoted text -

- Show quoted text -

i found the event FormulaChanged in the object browser. but i didn't
succeed to add it to my project. if i right click it then the "View
Definition" option is dimmed so i don't know how to edit the event.
the same with the Shape class the event belongs to. i'd like to add
the shape class to my project together with all its events\methods\etc
in addion to ThisDocument class. can you show me how to do it?

thanks
David
 
D

David

Have you read?:http://msdn.microsoft.com/en-us/library/aa201789(office.10).aspx

If you are using VBA, then you'll probably need to declare an object
WithEvents, but use with care because too many will slow your app down.  For
example, I found that even having just the stub for CellChanged dramatically
slows things down, even if there is no code inside the stub.

For serious programming, WithEvents is frowned on, and AddAdvice is
recommended instead.











i found the event FormulaChanged in the object browser.  but i didn't
succeed to add it to my project.  if i right click it then the "View
Definition" option is dimmed so i don't know how to edit the event.
the same with the Shape class the event belongs to.  i'd like to add
the shape class to my project together with all its events\methods\etc
in addion to ThisDocument class.  can you show me how to do it?

thanks
David

--
David Parker
Microsoft MVP (Visio)http://bvisual.spaces.live.comhttp://www.visualizinginformation.com- Hide quoted text -

- Show quoted text -

thanks alot!
 

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