Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

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

Mirroring Elements Issues

1 REPLY 1
Reply
Message 1 of 2
jacsmithstrongtie
191 Views, 1 Reply

Mirroring Elements Issues

Hello everyone,

 

I am looking for some help with a using the ElementTransformUtils.MirrorElements(doc, MirElems, MirPlane, False).

 

The transaction does not commit and the Exception reads 

jacsmithstrongtie_0-1711651696695.png

I have wrapped this in ElementTransformUtils.CanMirrorElements() and the result is true.  So, my question is why would this be happening?  Is there a way to see where the bad element(s) may be?

 

Any help would be greatly appreciated!

Thank you

Labels (2)
1 REPLY 1
Message 2 of 2

Hi @jacsmithstrongtie 

 

       This exception rises when you try to mirror pinned elements, Place a checkpoint Before mirroring to check the element are Pinned or Not.

 

Exception Reference Image:

 

MirrorElements Method (Document, ICollection(ElementId), Plane, Boolean) 

 

 

Mohamed_Arshad_0-1711689628052.png

 

Reference Code

///Check the element is Pinned to Not
                if (e.Pinned)
                {
                    e.Pinned = false; ///Un-Pin the element if it is pinned
                }

 

Hope this will Helps 🙂

 

Thanks & Regards,
Mohamed Arshad K

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

Post to forums  

Autodesk Design & Make Report