Community
AutoCAD MEP Forum
Welcome to Autodesk’s AutoCAD MEP Forums. Share your knowledge, ask questions, and explore popular AutoCAD MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mirror command will not mirror a pipe object anchored to a mvpart object.

6 REPLIES 6
Reply
Message 1 of 7
Keith.Brown
524 Views, 6 Replies

Mirror command will not mirror a pipe object anchored to a mvpart object.

When i anchor a pipe to a mvpart and then mirror both objects only the mvpart is mirrored in the correct location.  The pipe is copied but stays in its original location.  Does anyone else see the same thing or is it specific to my machine and setup?

 

This does not happen when i anchor a mvpart to a mvpart.

 

6 REPLIES 6
Message 2 of 7
VitalyF
in reply to: Keith.Brown

Hi Keith,

 

mirror pipe with mvpart works fine for me

 

mep2014 with SP1 win7 x86  SP

 

PipeMirror.gif

 

Vitaly

Message 3 of 7
Keith.Brown
in reply to: VitalyF

What happens when you use OBJECTANCHORATTACH  to anchor the pipe to the mvpart and then mirror it?  The mvpart and pipe combo that I am using is not quite the same as yours and therefore might get different results.  You are using an inline mvpart.  I am using a standalone mvpart (clevis hanger)  where I have manually anchored the pipe (threaded rod) to it.

 

In the video below I am mirroring a pipe that has been anchored to the mvpart using the OBJECTANCHORATTACH command.  Once it is mirrored i am selecting the pipe that did not mirror correctly and moving it to the location where it belongs. (I did not record the command line to show commands)

 

Mirror Anchored Pipe.gif

 

 

I uninstalled all third party software that I had installed and i still got the same results.  Additionally i have several consultants that get the same results as me but they are running the exact same software as myself.

 

I created a .net plugin to programmatically move the pipe when the mirror command was complete back to where it belongs but it also failed.  I then automated the processes using the MOVE command it worked fine.  Below is the code snippet that I used in .NET C#.

 

if (ecPartType == "Threaded Rod")
{
    threadedRod.UpgradeOpen();
    var startPoint = new Point3d(threadedRod.StartPoint.X, threadedRod.StartPoint.Y, threadedRod.StartPoint.Z);
    var connectionOffset = new double();

    // Get the offset from the hanger insertion point to the threaded rod insertion point
    if (TryGetValueDouble(hanger, "E", ref connectionOffset))
     {
        var endPoint = new Point3d(hanger.Location.X, hanger.Location.Y, hanger.Location.Z + connectionOffset);
                                    
        // If the threaded rod is not located on the hanger then move it there.
        if (startPoint != endPoint)
        {
            // Programmatically moving the threaded rod will do nothing.
            // Vector3d vector3d = startPoint.GetVectorTo(endPoint);
            // threadedRod.TransformBy(Matrix3d.Displacement(vector3d));
 
            // Instead we must use the command "move" to move the object.

// Get the Move command Base points (start) and end point (end) var start = string.Format("{0},{1},{2}", startPoint.X, startPoint.Y, startPoint.Z); var end = string.Format("{0},{1},{2}", endPoint.X, endPoint.Y, endPoint.Z);

// Select the pipe by its handle. string handEnt = "(handent \"" + threadedRod.Handle.ToString() + "\"" + ")";

// Build the command string and Execute string command = "_move" + "\n" + handEnt + "\n" + "\n" + start + "\n" + end + "\n"; document.SendStringToExecute(command, false, false, false); } } }

 

Using .net to automate the MOVE commands works but using the AutoCAD .NET API fails which leads me to believe that something is causing the TransformBy method to fail.

 

 

Message 4 of 7
VitalyF
in reply to: Keith.Brown

Hi Keith,

 

Anchor works ambiguously
Why do not you use the connectors for for mvparts?

 

MirrorPipe2.gif

 

Vitaly

Message 5 of 7
Keith.Brown
in reply to: VitalyF


@VitalyF wrote:

 

 

Why do not you use the connectors for for mvparts?

 


My task is to fix another 3rd party addin that creates hangers (mvparts) and threaded rods (pipes) and attaches the threaded rods using the OBJECTANCHORATTACH command.  The threaded rod is attached to a pipe connector that is located on the hanger.  I believe the reason for the object anchor is so that they can read property set information through the anchor.  I don't really know why they did it that way and honestly it doesnt pertain to my question.

 

I have a multi-view part which has a pipe attached to a pipe connector on that multi-view part.  It is also anchored using a object anchor.  When both objects are mirrored the pipe will not mirror in the correct location.  I have multiple people getting the same results in vanilla AutoCAD MEP without any addons active.

 

I have attached a dwg that contains the scenario that I am describing.

 

**EDIT**  I have requested that an Autodesk representative look at this.

Message 6 of 7
pothied
in reply to: Keith.Brown

Hi Keith, I have logged this issue with development to investigate the problem.



David Pothier

Message 7 of 7
Keith.Brown
in reply to: pothied

Thank you.  I thought I should mention that I am seeing the same behavior with the stretch command.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost