<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Flip Family Instance in 180 Degree in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5808491#M70661</link>
    <description>&lt;P&gt;Dear Dhiraj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is what I have heard back so far:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. For flipping Structural Framing elements we use StructuralFramingUtils::flipEnds(). As I browsed code very quickly, it don’t have any excludings (except material) so it should work for every FamilyInstance (probably that is bad).&amp;nbsp;This is not nice solution but I would give a try and check if StructuralFramingUtils::flipEnds() works.&amp;nbsp;Flip for Structural Framing means “swap ends =&amp;gt; exchange beginning with end”.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 I think this question is more about the general family instance transform than MEP things, I am afraid I am not the best one to answer it , but here is some comments to my best knowledge:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;2.1. FamilyInstance.rotate() is a flip operation actually, it will work only if FamilyInstance.CanRotate==True; e.g, when you select the family instance, some kinds of flip control should be shown. For the coupling the video, obviously, there is no such control after selection, so the FamilyInstance.rotate() wont’t work for it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;2.2. I think flip operation is just a kind of mirror operation, the difference is that, user can specify the axis for mirror while the axis for flip is computed. Not all Revit family instances can be mirrored or flipped; &amp;nbsp;but all family instance should be able to be generally &amp;nbsp;rotated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I hope this helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Please let us know how it goes and how you end up solving this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Sep 2015 06:33:42 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2015-09-09T06:33:42Z</dc:date>
    <item>
      <title>Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801172#M70650</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; How to flip familyInstance in 180 degree(not to rotate base on Location Point).&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; i am trying this..&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bool a = FamilyInstance.rotate();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MessageBox.Show(a.ToString());&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; but a is always returning false value.i am really frustrated with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Please suggest.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Thank You,&lt;BR /&gt;&amp;nbsp; Dhiraj&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 08:27:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801172#M70650</guid>
      <dc:creator>patild</dc:creator>
      <dc:date>2015-09-03T08:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801191#M70651</link>
      <description>&lt;P&gt;ElementTransformUtils.RotateElement or&lt;/P&gt;&lt;P&gt;ElementTransformUtils.MirrorElement&lt;/P&gt;&lt;P&gt;depending on what you are seaching for in detail&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 08:45:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801191#M70651</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-09-03T08:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801308#M70652</link>
      <description>Thank you for quick reply..&lt;BR /&gt;I tried both of your given ways, actually flip is what i m looking for pragmatically.&lt;BR /&gt;Mirror element is mirroring but i m drawing structure in slope, so unable to get required output with this.&lt;BR /&gt;&lt;BR /&gt;Please suggest.&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Sep 2015 11:13:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801308#M70652</guid>
      <dc:creator>patild</dc:creator>
      <dc:date>2015-09-03T11:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801333#M70653</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(yourFamilyInstance.CanFlipHand)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; yourFamilyInstance.flipHand();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 11:30:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801333#M70653</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-09-03T11:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801415#M70654</link>
      <description>Thank you for quick reply..&lt;BR /&gt;I tried this method . but doesn't work for me.&lt;BR /&gt;Only working case for me is manually "Flip Fitting" arrow besides fitting after selection.&lt;BR /&gt;&lt;BR /&gt;Please suggest.&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 03 Sep 2015 12:05:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801415#M70654</guid>
      <dc:creator>patild</dc:creator>
      <dc:date>2015-09-03T12:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801444#M70655</link>
      <description>&lt;P&gt;Hi patild,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no more ideas without more input.&lt;/P&gt;&lt;P&gt;All of the methods mentioned above should work, theoretically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you are writing about "fitting": is your Element an MEP object, having connectors attached to it ?&lt;/P&gt;&lt;P&gt;Could you provide a screenshot ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another idea: could it be that the flip direction is connected to a parameter which can be set by you ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:21:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5801444#M70655</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-09-03T12:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5805762#M70656</link>
      <description>&lt;P&gt;Hello dear,&lt;/P&gt;&lt;P&gt;I have created a video showing, how it is done manually after pressing spacebar.&lt;/P&gt;&lt;P&gt;Please find attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this is revit inbuilt behaviour after pressing "Space Bar" key.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your valuable time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhiraj.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 06:44:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5805762#M70656</guid>
      <dc:creator>patild</dc:creator>
      <dc:date>2015-09-07T06:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5805794#M70657</link>
      <description>&lt;P&gt;Hi patild,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've watched the video.&lt;/P&gt;&lt;P&gt;No idea how to simulate the space key behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I stated in my first reply, you could use ElementTransformUtils.Rotate.&lt;/P&gt;&lt;P&gt;Get the pipe fitting's BoundingBoxXYZ, calculate its center point, calculate another point relative of it, in z direction.&lt;/P&gt;&lt;P&gt;Now you have the two points to define the rotation axis.&lt;/P&gt;&lt;P&gt;Rotation angle is Math.Pi/2, that's 90 degrees.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now ideas, otherwise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 07:19:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5805794#M70657</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-09-07T07:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5805866#M70658</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you already tried to simultate pressing the space bar by using SendKeys ?&lt;/P&gt;&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2008/12/driving-revit-from-outside.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2008/12/driving-revit-from-outside.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 08:24:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5805866#M70658</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-09-07T08:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5806817#M70659</link>
      <description>&lt;P&gt;Dear Dhiraj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I passed your query on to the development team.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The important things that you need to explain right from the start are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wish to programmatically flip an MEP fitting, like the built-in manual Revit 'Flip Fitting' command, also triggered by hitting the space bar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That would have saved both of you two significant effort.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks to Revitalizer for his persistent attempts to help you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2015 07:17:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5806817#M70659</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-09-08T07:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5806961#M70660</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;SPAN&gt;Jeremy and specially&amp;nbsp;Revitalizer for your valuable Time for reviewing this case.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am waiting for positive feedback from your development team.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks and Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dhiraj.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2015 09:25:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5806961#M70660</guid>
      <dc:creator>patild</dc:creator>
      <dc:date>2015-09-08T09:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5808491#M70661</link>
      <description>&lt;P&gt;Dear Dhiraj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is what I have heard back so far:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. For flipping Structural Framing elements we use StructuralFramingUtils::flipEnds(). As I browsed code very quickly, it don’t have any excludings (except material) so it should work for every FamilyInstance (probably that is bad).&amp;nbsp;This is not nice solution but I would give a try and check if StructuralFramingUtils::flipEnds() works.&amp;nbsp;Flip for Structural Framing means “swap ends =&amp;gt; exchange beginning with end”.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 I think this question is more about the general family instance transform than MEP things, I am afraid I am not the best one to answer it , but here is some comments to my best knowledge:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;2.1. FamilyInstance.rotate() is a flip operation actually, it will work only if FamilyInstance.CanRotate==True; e.g, when you select the family instance, some kinds of flip control should be shown. For the coupling the video, obviously, there is no such control after selection, so the FamilyInstance.rotate() wont’t work for it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;2.2. I think flip operation is just a kind of mirror operation, the difference is that, user can specify the axis for mirror while the axis for flip is computed. Not all Revit family instances can be mirrored or flipped; &amp;nbsp;but all family instance should be able to be generally &amp;nbsp;rotated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I hope this helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Please let us know how it goes and how you end up solving this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2015 06:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5808491#M70661</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-09-09T06:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Flip Family Instance in 180 Degree</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5808682#M70662</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;SPAN&gt;Jeremy for that step by step information. I have search for "CanRotate" property for mep fittings which have flip arrow but it is false for those fittings also.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please Suggest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please find attached video for more info.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dhiraj.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2015 09:34:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/flip-family-instance-in-180-degree/m-p/5808682#M70662</guid>
      <dc:creator>patild</dc:creator>
      <dc:date>2015-09-09T09:34:59Z</dc:date>
    </item>
  </channel>
</rss>

