22 Replies Latest reply on Aug 31, 2015 6:19 PM by Karen Robine

    ESRI geometric connect/disconnect tools

    Julie Hamilton

      Is there any reason not to use ESRI's geometric connect/disconnect tools?  There was a Best Practices post from 2008 that recommends against it. http://arcfmdirectorscut.typepad.com/beta/2008/09/best-practices.html

        • Re: ESRI geometric connect/disconnect tools
          Kevin Leben

          Hi Julie,

           

          It is still true that you should not use the ESRI connect/disconnect tools. Instead, you should use the ArcFM Connect and Disconnect tools. This is so ArcFM autoupdaters will fire to maintain the integrity of your network. This is explained here: http://resources.arcfmsolution.com/10.2%20and%2010.2.1/DesktopUsing/ArcFM_Connect_and_Disconnect_Tools.html.

           

          Regards,

           

          Kevin

          • Re: ESRI geometric connect/disconnect tools
            Philip Davenport

            Julie,

            It is true the ESRI connect/disconnect does not fire AU's to update Feeder ID's of all features downstream which is precisely why we use it at times. If we are doing work of some kind at a point in the network where many features are downstream, we will use the ESRI disconnect in order to prevent tens of thousands of feature updates of all of those downstream features. You just have to be careful that you have everything reconnected once you have completed your work.

             

            Philip

              • Re: ESRI geometric connect/disconnect tools
                Cristian Pinheiro de Souza

                Hi for all

                 

                I have seen the connect/diconnect tools of ArcFM, but now I have a question. And with the ArcObjects? What is the best practice?

                When I whant diconnect a feature, a do as at below:

                INetworkFeature networkFeature = (INetworkFeature)feature;

                networkFeature.Disconnect();

                 

                But and now? How I do the same thing considering the ArcFM tools?

                 

                Thanks

                 

                Cristian

                  • Re: ESRI geometric connect/disconnect tools
                    Melia Brush

                    Cristian, I am usingAt Mention of the GIS Developers space to bring your question to the attention of ArcGIS and ArcFM programmers.

                      • Re: ESRI geometric connect/disconnect tools
                        Cristian Pinheiro de Souza

                        Thank you Melia

                         

                        I really need of the answer. At the moment, I have done some tests, but without sure yet, as below to disconnect feature:

                         

                        System.Type typeAU = Type.GetTypeFromProgID("mmGeoDatabase.MMAutoUpdater");
                        IMMAutoUpdater mmAutoUpdater = (IMMAutoUpdater)System.Activator.CreateInstance(typeAU);

                        INetworkFeature networkFeature = (INetworkFeature)feature;
                        networkFeature.Disconnect();
                        mmAutoUpdater.FeatureDisconnected(networkFeature);

                         

                        When I want connect the feature, I have done:

                         

                        networkFeature.Connect();

                        mmAutoUpdater.FeatureConnected(networkFeature);

                         

                        Are these procedures ok? If the ArcFM programers may help me, I would be grateful.

                         

                        Thanks

                         

                        Cristian

                          • Re: ESRI geometric connect/disconnect tools

                            Hi Cristian,

                             

                            I spoke with one of the networks team developers and he said that you should be using the Disconnect and Connect classes in Miner.Edit, e.g.:

                             

                            Miner.Geodatabase.Edit.Disconnect disconnect = new Disconnect();
                            disconnect.DisconnectFeature(feature);
                            

                             

                            Connect should look similar.

                              • Re: ESRI geometric connect/disconnect tools
                                Cristian Pinheiro de Souza

                                Hi Matthew

                                 

                                I include reference to Miner.Geodatabase and I did not find the classes Disconnect and Connect.

                                I am using ArcFM 10.0.3 SP1. It is the current version of the AESSul. Exist these classes in 10.0.3?

                                 

                                Thanks

                                 

                                Cristian

                                  • Re: ESRI geometric connect/disconnect tools

                                    Hi Cristian,

                                     

                                    The class might have been internal in 10.0.3 (it should be public in 10.2.1b).  Prior to 10.2.1b, the only way to do what you want is to create the command (ArcFM Connect or Disconnect) using the activator and execute it. 

                                     

                                    The connect network feature AU only runs an Esri connect, so it won't do anything.

                                      • Re: ESRI geometric connect/disconnect tools
                                        Cristian Pinheiro de Souza

                                         

                                        Thank you by response Mathew

                                         

                                        Unfortunately, I think it use ArcFM Commands, using activators is not an option.

                                        I am working in the special import data process, and I will not have selected features to use with commands.

                                        In this process, I need disconnect and reconnect some features and because of this my concern with Feeder Manager.

                                        However, on second thought, I am not disabling Autoupdaters in this process and after disconnect and reconnect, I am using feature.Store, so, I think that the AUs will run and all will be right.

                                        The problem for example, will be if I disconnect a feature, move it to some other place, and reconnect it. The feature moved ok because I used Store and her AUs will run. However, the other features, before connected at feature moved, perhaps will have problems with their Feeder Manager data. 

                                        It is my concern Mathew.

                                        Thanks

                                         

                                          • Re: ESRI geometric connect/disconnect tools

                                            Hi Cristian,

                                             

                                            I don't think the edit events (and subsequent AUs which fire) will suffice.  If I recall correctly, we wrote the ArcFM Connect and ArcFM Disconnect tools because Esri Connect and Disconnect didn't fire all of the events that we needed to listen to to properly connect network features.  I know that we recommend that people not-use the Esri versions of those tools, but I don't know about programmatic edits - it could work, but I'm not sure if it will.

                                             

                                            To move forward, I would suggest that you do some testing and verify that your connectivity looks good by just allowing the AUs to fire as you do the edits.  If it looks like there are problems (that is, you can't trace through your edits as you expect, or field values aren't being updated correctly) log a GIS Support case so you can get some more-focused help.

                                             

                                            Hope that helps.

                                          • Re: ESRI geometric connect/disconnect tools
                                            Neil Etheridge

                                            Hi Matthew,

                                             

                                            I'm also trying to programmatically disconnect lines (at version 10.1.1) and I'm just want to clarify your statement "the only way to do what you want is to create the command (ArcFM Connect or Disconnect) using the activator and execute it".  I just want to confirm you are referring to these ArcFM Connect and Disconnect commands ...

                                            I would normally use the following code to find a tool and execute it.

                                             

                                            UID disconnectCommandUID = new UIDClass();
                                            disconnectCommandUID.Value = "Miner.Desktop.FeederManager.Commands.Disconnect";
                                            ICommandItem disconnectCommand = _application.Document.CommandBars.Find(disconnectCommandUID);
                                            disconnectCommand.Execute();
                                            

                                             

                                            Is there another/better way using the activator class?  I got this far but not sure what interface to cast to so I can execute it?

                                             

                                            System.Type disconnectType = Type.GetTypeFromProgID("Miner.Desktop.FeederManager.Commands.Disconnect");
                                            object disconnectorObj = System.Activator.CreateInstance(disconnectType);
                                            

                                             

                                            Many thanks,

                                            Neil