<?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: Element Reversed in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9934693#M29774</link>
    <description>&lt;P&gt;I don't fully understand your description regarding door/window elements.&amp;nbsp;As far as I'm aware there are curtain walls that can host curtain panel doors, system curtain panels etc. Then there are walls (non-curtain walls) that can't host curtain anything. Do you have an small sample file with a brief IExternalCommand that demonstrates the issue i.e. placing the wall, doors etc then rotating the thing that is causing the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an alternative to ElementTransformUtils you could try rotating via&amp;nbsp; Location.Rotate or changing the LocationCurve if applicable. It sounds however that the built-in failure is due to one elements relation to another perhaps.&lt;/P&gt;</description>
    <pubDate>Sat, 12 Dec 2020 11:40:50 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2020-12-12T11:40:50Z</dc:date>
    <item>
      <title>Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9928272#M29768</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am creating a wall and rotating it using revit api calls in Python. It has created many walls successfully, but for a few walls, it raised a warning saying Element is reversed and I have no choice but to delete it. Before committing the transaction, is there a way to check if the element is reversed? Or what is causing this error....!?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a 'Wall_Data" class, which has various properties of the wall and there is a method to create the wall instance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create the wall like this;&lt;BR /&gt;wall = Wall.Create(doc, self.curve, self.wall_type.Id, self.base_level.Id, self.height, self.wall_offset, False, False)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Any idea how to fix this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 00:16:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9928272#M29768</guid>
      <dc:creator>harilalmn</dc:creator>
      <dc:date>2020-12-10T00:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9930808#M29769</link>
      <description>&lt;P&gt;That is an editing failure i.e. not due to wall creation but editing:&lt;/P&gt;&lt;P&gt;BuiltInFailures.EditingFailures.ElementReversed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So is it actually occurring during your rotation attempt? Swap ends of wall prior to creation with Curve.CreateReversed instead of Rotating wall after creation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't really get your workflow in terms of why you need to rotate after creating the wall. You must know which way around you are creating it in relation to an orientation you care about, so what stops you orientating it correctly to start with?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 20:31:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9930808#M29769</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-12-10T20:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9931573#M29770</link>
      <description>&lt;P&gt;Thanks a lot for that advice.. I will try.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 04:00:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9931573#M29770</guid>
      <dc:creator>harilalmn</dc:creator>
      <dc:date>2020-12-11T04:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9931856#M29771</link>
      <description>&lt;P&gt;Ok, it is caused by the rotate command. Now, this being happenning only for some caurtain walls, I will reverse the curve "if the element is reversed" and re-create it. But could you please tell me how to check if the element is reversed before committing the transaction of rotate command? Is that ElementReversed property of a boolean type, so that I can write soimething like; if wallObject.ElementReversed: curve.CreateReversed()&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 07:35:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9931856#M29771</guid>
      <dc:creator>harilalmn</dc:creator>
      <dc:date>2020-12-11T07:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9932247#M29772</link>
      <description>&lt;P&gt;I believe there is no such thing as a reversed wall it is telling you the wall cannot be rotated or it will become reversed (cannot be rotated into that position). By what angle are you rotating it after creation and why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is something that would happen in the UI if you tried to rotate it and probably relates to degree of rotation and current position. What method are you using to rotate?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 11:07:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9932247#M29772</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-12-11T11:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9933516#M29773</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Actually the element is a curtain wall. This curtain wall is used where ever a door has to be placed. Please note that the Revit standard door family is not used for doors and windows, instead, for some reason, curtain wall is used, which is set to embed into the generic wall which is supposed to be the host for these doors and windows. The data is coming from an XML file. The XML element which describes the door has child nodes for;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Location - xyz values separated by whitespace&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Rotation - angles for x, y and z axis separated by whitespace, like;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"0 0 90", which means door is rotated by 90 degrees on z axis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Mirrored - like rotation but 1 or 0 for x, y and z indicating boolean values&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is how I rotate it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;ElementTransformUtils.RotateElement(doc,&amp;nbsp;self.door_id,&amp;nbsp;self.z_axis,self.rotation_z&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;A typical door definition in XML is as follows;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;object&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;asset id="206"/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;type door&amp;lt;/type&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;points&amp;gt;11.573 3.972 0&amp;lt;/points&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;size&amp;gt;0.9 0.1 2.2&amp;lt;/size&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;rotation&amp;gt;0 0 90&amp;lt;/rotation&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;mirrored&amp;gt;0 0 1&amp;lt;/mirrored&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/object&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 19:56:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9933516#M29773</guid>
      <dc:creator>harilalmn</dc:creator>
      <dc:date>2020-12-11T19:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9934693#M29774</link>
      <description>&lt;P&gt;I don't fully understand your description regarding door/window elements.&amp;nbsp;As far as I'm aware there are curtain walls that can host curtain panel doors, system curtain panels etc. Then there are walls (non-curtain walls) that can't host curtain anything. Do you have an small sample file with a brief IExternalCommand that demonstrates the issue i.e. placing the wall, doors etc then rotating the thing that is causing the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an alternative to ElementTransformUtils you could try rotating via&amp;nbsp; Location.Rotate or changing the LocationCurve if applicable. It sounds however that the built-in failure is due to one elements relation to another perhaps.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2020 11:40:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9934693#M29774</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-12-12T11:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9939407#M29775</link>
      <description>&lt;P&gt;Try rotating the element's position and/or orientation before you place it.&lt;/P&gt;&lt;P&gt;For example, with a door hosted on a wall, use this method:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Autodesk.Revit.Creation.Document.NewFamilyInstance(
	XYZ location,
	FamilySymbol symbol,
	XYZ referenceDirection,
	Element host,
	StructuralType structuralType
)&lt;/LI-CODE&gt;&lt;P&gt;Where&amp;nbsp;referenceDirection is the direction you want the door to have. To calculate the referenceDirection, create a&amp;nbsp;&lt;A href="https://apidocs.co/apps/revit/2020/58dd01c8-b3fc-7142-e4f3-c524079a282d.htm" target="_blank" rel="noopener"&gt;transform&lt;/A&gt; for the specified rotations and apply it to the default direction vector of the family (for a door, I think this would be &amp;lt;0,1,0&amp;gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a wall, you would have to rotate the curve before you pass it into the method used to create the wall.&lt;/P&gt;&lt;P&gt;If you cannot figure out how to rotate the curve (AFAIK, Revit's API does not provide a convenient method for rotating curves), you could create a ModelCurve, rotate it, then get it's LocationCurve, making sure to commit the transaction before and after rotating it. You probably also want to delete the ModelCurve afterwards.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 18:58:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9939407#M29775</guid>
      <dc:creator>mhannonQ65N2</dc:creator>
      <dc:date>2020-12-14T18:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9940369#M29776</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the advice. As you have advised, I have rotated the curve instead of rotating the wall and it worked. But this too was a bit challenging for I could not figure out how to rotate that "Line in space". But I did it by creating a function like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;def rotated_coords(point,center,angle):
    x, y = point
    p, q = center
    a = angle
    return XYZ(
        (x-p) * math.cos(a) - (y-q) * math.sin(a) + p, 
        (x-p) * math.sin(a) + (y-q) * math.cos(a) + q, 
        0
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; I don't know if this is the efficient way of dealing with the problem, but this worked. Thanks again...&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 05:06:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9940369#M29776</guid>
      <dc:creator>harilalmn</dc:creator>
      <dc:date>2020-12-15T05:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Element Reversed</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9940370#M29777</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8377999"&gt;@mhannonQ65N2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I had done the same, but in a different way. I did not want to go for that extra step of creating a model curve and then delete it after creating the wall. So I managed it with another function to get the rotated end points of the 'Line in space'. Kindly check my reply for&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;. I have shared the function I used.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 05:10:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/element-reversed/m-p/9940370#M29777</guid>
      <dc:creator>harilalmn</dc:creator>
      <dc:date>2020-12-15T05:10:07Z</dc:date>
    </item>
  </channel>
</rss>

