Requery: Connection Point delete events 
Author Message
 Requery: Connection Point delete events

The following is a repost of my original question which Graham answered. The
problem is that I'm trying to keep track of the user deleting connection
points on shapes before a connection is established between parts. I'm
trying to make sure that a user doesn't remove too many or add too many
connection points to a shape that can enter into variable numbers of
connections with other parts.

<original message follows>

What's the best way to capture the user deleting a connection point from a
shape in Visio 5? It's working using the Formula Changed events when the
first connection point is removed but not for subsequent ones.

The code I'm currently using:

dim withevents m_shpObj as visio.shape

sub InitWith (ByVal aShape as Visio.Shape)
    set m_shpObj = aShape
end sub

sub Document_ShapeAdded(shape as Visio.IVShape)
    Call InitWith(shape)
end sub

Then the m_shpObj_Formula Changed event reports the change to the
Connections.X1 etc. formulas only the first time one of two connection
points is deleted.

Any advise or suggestions?



Fri, 04 Apr 2003 03:00:00 GMT  
 Requery: Connection Point delete events
Craig:

Quote:
> Then the m_shpObj_Formula Changed event reports the change to the
> Connections.X1 etc. formulas only the first time one of two connection
> points is deleted.

Hmmm, this is probably because a connection point deletion involves
deleting a row in the COnnection Points section, not changing a formula,
per se.

I didn't see you answer why you were avoiding the ConnectionsDeleted
event -- are you compelled to avoid it?

Graham
--------------------------------------------
Graham Wideman
MS MVP for Visio
Book: Visio 2000 Developer's Survival Guide
... and resources for programmable diagramming at:
http://www.diagramantics.com
--------------------------------------------
Unoffical Visio FAQ:
http://www.diagramantics.com/diagenvs/visio/faq/index.htm

(Remove the obvious to email me)
---------------------------------------------



Tue, 15 Apr 2003 18:56:23 GMT  
 Requery: Connection Point delete events
the reason why I wasn't using ConnectionsDeleted event is because I wanted
to my program to respond to a user deleting a connection point rather than a
connector. Let me elaborate on what I'm trying to do - there may be a better
way I'm just not seeing.

I've built a visual custom product configurator for disposable medical
products. Users select the parts they want to use from a stencil and drag
them onto the workspace. These component stencils come with the "standard"
number of connection points on them and can be connected together in
different ways including the number of other parts that can be glued to
them. Anytime two components are connected together on the screen the
program looks up the relationship in a database containing testing results
to see if the connection requires further testing or can be built based on
existing test data.

My problem is this - since some compoents have variable numbers of
connection points I'm relying on the user to add or remove the connection
points they need to accurately represent the real life connections. I want
to be abe to check their actions against a database that contains the
maximum and minimum allowed number of connection points on a particular
component and display a message when they try to add or remove connection
points above the max or below the min.  This would potentially occur before
they ever started to "glue" the configuraiton togther with connector
objects.

Do you have any additional suggestions on an approach for this?

TIA
Craig



Quote:
> Craig:

> > Then the m_shpObj_Formula Changed event reports the change to the
> > Connections.X1 etc. formulas only the first time one of two connection
> > points is deleted.

> Hmmm, this is probably because a connection point deletion involves
> deleting a row in the COnnection Points section, not changing a formula,
> per se.

> I didn't see you answer why you were avoiding the ConnectionsDeleted
> event -- are you compelled to avoid it?

> Graham
> --------------------------------------------
> Graham Wideman
> MS MVP for Visio
> Book: Visio 2000 Developer's Survival Guide
> ... and resources for programmable diagramming at:
> http://www.diagramantics.com
> --------------------------------------------
> Unoffical Visio FAQ:
> http://www.diagramantics.com/diagenvs/visio/faq/index.htm

> (Remove the obvious to email me)
> ---------------------------------------------



Fri, 18 Apr 2003 23:12:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Connection Point Delete Events

2. Using On_Delete Event and Me.Requery to Logically Delete Records

3. How to receive events from a connection point

4. Connection Point Events Lost When Modal Dialog Open

5. Requery listbox after delete

6. Delete Then "Refresh/Requery" DataGrid

7. ADO Connection problem with requery

8. Control requery - sequence of events...

9. ReQuery - OnChange Events Problems

10. Requery into subform on Change Event

11. Requery event

12. Deleting points in a control array

 

 
Powered by phpBB® Forum Software