Pipe network disconnected automatically

Pipe network disconnected automatically

Anonymous
Not applicable
3,840 Views
18 Replies
Message 1 of 19

Pipe network disconnected automatically

Anonymous
Not applicable

hi,

 

I have a pipe network's project here and all of a sudden all the pipes disconnected from the structures automatically; are there any way to re-connect the pipes to structure again?

 

I am using Autocad CIVIL 2015.

 

Tks!

0 Likes
Accepted solutions (1)
3,841 Views
18 Replies
Replies (18)
Message 2 of 19

Civil3DReminders_com
Mentor
Mentor

Select the pipe, right click and choose Connect To Part (or structure; I forget what the exact wording is) and then select the structure. 

 

Then repeat the process for all of the disconnect parts and pipe ends. 

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
0 Likes
Message 3 of 19

Anonymous
Not applicable

But I have a pipe network with many structures and pipes, is it possible to re-connect all of then once?

0 Likes
Message 4 of 19

MikeEvansUK
Advisor
Advisor

Ans. Globally Not out of the box only one by one.

 

If you are familiar with Vb then yes you can fix the network.

 

The reason this happened is most likely due to you dragging a structure which envokes the DropGeom command and for some reason disconnects all structures. Keep your eye out for this in the future: As soon as it happens do an undo and all should be ok.

 

Can you go backwards to a place where this was correct? That I imagine would be the best solution.

 

If no pls post it I can try for you but i cant promise it will work due to parts etc.

 

M.

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 5 of 19

MikeEvansUK
Advisor
Advisor

Post Deleted:

 

Sorry difunctional application:

 

Will correct annother time. Do not use application!

 

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 6 of 19

MikeEvansUK
Advisor
Advisor

Sorry about that: Proves yopu must test things first.

 

I originally attached a program which prevents drop geom command working but had issues. It seems when you drag geometry two commands run, DropGeom & OLEDRAGDROP. I was getting unexpected results in R2015 where the MSpace cross hairs would not appear to move while coordinates detailed otherwise. This was caused by my lack of C# skills, I had a loop i think.

 

I believe have now rectified this but please check before you use in a working environment.

 

Attached corrected file for 2015 & 2013. This will prevent the commands running and will thus prevent the dropgeom command from breaking the pipe connections in the network.

 

Pls note: Use at own risk, It should not cause trouble but is only manually loaded (via Netload) into each session. once the session is closed it must be reloaded to enable again.

 

Hope this helps. I'll be using this myself from now on.

 

 

For anyone who cares here is the codebase: If you find something wrong or have sugestions pls post here. We may need this until we have a future fix.

 

 

using Autodesk.AutoCAD.EditorInput;

using Autodesk.AutoCAD.ApplicationServices;

using Autodesk.AutoCAD.Runtime;

using System;

using System.Collections.Specialized;

namespace VetoTest
{

    public class VetoCmds : IExtensionApplication
    {

        public void Initialize()
        {

            DocumentCollection dm =

              Application.DocumentManager;

            dm.DocumentLockModeChanged += new

              DocumentLockModeChangedEventHandler(

                vetoCommandIfInList

              );

        }

        public void Terminate()
        {

            DocumentCollection dm;

            dm = Application.DocumentManager;

            dm.DocumentLockModeChanged -= new

              DocumentLockModeChangedEventHandler(

                vetoCommandIfInList

              );

        }

        private void vetoCommandIfInList(

            object sender,

            DocumentLockModeChangedEventArgs e)
        {

            //if (cmdList.Contains(e.GlobalCommandName.ToUpper()))
            try
            {
                if (e.GlobalCommandName == "DROPGEOM"|| e.GlobalCommandName == "OLEDRAGDROP")
                {
                    e.Veto();

                    Document doc =

          Application.DocumentManager.MdiActiveDocument;

                    Editor ed = doc.Editor;

                    ed.WriteMessage("DropGeom Prevented");

                }
            }


            catch (System.Exception ex)
            {

                Document doc =

                  Application.DocumentManager.MdiActiveDocument;

                Editor ed = doc.Editor;

                ed.WriteMessage("\nException: " + ex.Message);
            }
        }
    }
}

M

 

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

Message 7 of 19

Jeff_M
Consultant
Consultant

@Anonymous wrote:

 

The reason this happened is most likely due to you dragging a structure which envokes the DropGeom command and for some reason disconnects all structures.

 

M.


Mike, can you elaborate on this? I drag structures into position all the time and have never run into this. Just trying to figure out what might be the trigger that you are encountering but I'm not.

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 8 of 19

Anonymous
Not applicable

Hello Mike!

 

So you are saying that to fiz my problem I need to use a VB programing? I am new in Civil and I don't know how to open the VB screen..how I do that?

 

About the the DropGeom command I don't use it, by the way I don't know what this command do.

0 Likes
Message 9 of 19

MikeEvansUK
Advisor
Advisor

Hi Jeff, I have often had this problem. It occurs where I use double click to edit a structre's properties.

 

When this happens, I double click and receive a "copy to clipboard failed" message/dialogue then all structures become disconnected. The command line shows no command but if I undo I get a "u Drop File GROUP" Which I figured is partly to do with the dropgeom etc commands however after testing I'm wrong.

 

On further investigation it seems that the following could be responsible.

 

#GETCLIPDATA

#GETCLIPDATADRAGENTER

#DRAGENTERONDROPEX

#ONDROPEX

 

This is what is reported by the e.GlobalCommandName when I get the error dialogue and what appears to be breaking the structures/pipes connections. however as they are internal/hidden commands I do not know anything about them. With the application running I still get this problem so I need to add these in instead and see if I can still get it to occur.

 

 

 

 

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 10 of 19

MikeEvansUK
Advisor
Advisor
Epic Fail: I Revised the application to the commands above and it appears you can not prevent the error in this way either.

The error Dialogue still appears even though the command is aborted and all structures in network still broken apart from one you tried to select.

You need to prevent the #GETCLIPDATA from being invoked at all.
Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 11 of 19

Jeff_M
Consultant
Consultant
Mike, I also have a double click action to edit structures and pipes. I have never experienced the disconnect issue. How is your dbl click action defined?
Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 12 of 19

redtransitconsultants
Collaborator
Collaborator

Like @Jeff_M, I too am curious at what causes this. I drag strutures all the time. I do know that if you drag pipes, they will disconnect from structures.

 

I've tried replicating by double clicking on structures as stated above and not seeing how that disconnects parts. Even running the command Disconnect Part, only works in singular mode by selecting a part, and then selecting a connected part to disconnect.

 

If one was to write a command to reconnect all parts, you would need the user to select the parts in question, then iterate through each pipe. Begin with the pipe's start point, then look for all structures with an equal location point - if found reconnect it. Then do the same for the pipe's end point, then move to the next pipe. At least that's how I'd approach it - but still very confused as to what would cause this.

Steve Hill,Civil Designer / .NET Developer / AutoCAD and AutoCAD Civil 3D Certified Professional
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

http://redtransitconsultants.com/
Autodesk Exchange Store
Twitter | LinkedIn | YouTube

0 Likes
Message 13 of 19

MikeEvansUK
Advisor
Advisor

Yes, I have double click action set for AECC_Structure ^C^CEditStructureProperties.

 

Now to reproduce is not easy. I have to try double clicking the structure over and over again most times I get the Props but ocasionally I get the error. It seems you need to double click and drag a little at the same time.

 

See screencast. Takes a while to get it to generate the error. Note the selected structure retains it's connections all others are killed.

 

M

 

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 14 of 19

brianchapmandesign
Collaborator
Collaborator

This has happened to me as well. Really annoying.


"Very funny, Scotty. Now beam down my clothes.
0 Likes
Message 15 of 19

MikeEvansUK
Advisor
Advisor

All, I have submitted a support request for this issue. Possible fearture request Fix all network connections (reconnect all Pipes and Structures).

 

BTW: I have submitted code to do this on the Developer forum which can be used or tweaked to suit.

 

Case ID 10897069.

 

 

 

 

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 16 of 19

MikeEvansUK
Advisor
Advisor
Accepted solution

There is a unsupported fix to this solution.

 

Following Tech support with Augusto you need to block. WblockClone and DeepClone for structures.

 

The following link explains how to do this. Http://adndevblog.typepad.com/autocad/net/page/20/ However the code appears to be slightly incorrect?

 

Now when I try to re-create the error it blocks the event. So no dialogue error. Hopefully this will be added in the future.

 

M

 

Below is fixed code:

 

using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.Civil.DatabaseServices;
public class ObjOverrule : ObjectOverrule
{
    static ObjOverrule objRule = null;
    public override Autodesk.AutoCAD.DatabaseServices.DBObject WblockClone(Autodesk.AutoCAD.DatabaseServices.DBObject dbObject,

             RXObject ownerObject, IdMapping idMap, bool isPrimary)
    {
        
        return null;

        //return base.WblockClone(dbObject,

        //ownerObject, idMap, isPrimary);

    }



    public override Autodesk.AutoCAD.DatabaseServices.DBObject DeepClone(Autodesk.AutoCAD.DatabaseServices.DBObject dbObject,

                Autodesk.AutoCAD.DatabaseServices.DBObject ownerObject, IdMapping idMap, bool isPrimary)
    {

        return null;

        //return base.DeepClone(dbObject,

        //ownerObject, idMap, isPrimary);

    }



    [CommandMethod("CopyOverrule")]

    static public void copyOverrule()
    {
        if (objRule == null)
        {

            objRule = new ObjOverrule();



            Overrule.AddOverrule(RXObject.GetClass(typeof(Structure)),

                                                   objRule, true);

            Overrule.Overruling = true;

        }

        else
        {

            Overrule.Overruling = false;

            Overrule.RemoveOverrule(RXObject.GetClass(typeof(Structure)),

                                                         objRule);

            objRule.Dispose();

            objRule = null;

        }

    }
}
Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

Message 17 of 19

Anonymous
Not applicable

How do I load this into the code? I made a .dll file with the code (via notpad) and loaded it with netload but it returned this

 

Command: NETLOAD
Cannot load assembly. Error details: System.BadImageFormatException: Could not load file or assembly 'file:///P:\Trooper\pipefix.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'file:///P:\Trooper\pipefix.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

What did I do wrong? 

 

Thank you

 

0 Likes
Message 18 of 19

Civil3DReminders_com
Mentor
Mentor
Is the P drive a network drive? If so move it to a local location on your computer.

It also might be blocked. Go into the file properties and choose unblock at the bottom of the first tab.
Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
0 Likes
Message 19 of 19

Anonymous
Not applicable

Moved it local same error

 

NETLOAD
Cannot load assembly. Error details: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\tlee\Desktop\pipefix.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'file:///C:\Users\tlee\Desktop\pipefix.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

0 Likes