<?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 Rebar contraints change automatically in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-contraints-change-automatically/m-p/8908740#M41057</link>
    <description>&lt;P&gt;I am using Revit 2019 and have an issue with rebar constraint behaviors.&lt;/P&gt;&lt;P&gt;I created a tool to create and set rebar to a specific location inside a Beam element. When I use the default RebarBarType or other small bar type, the tool works fine. However, if I increase the bar type for the standard bar, whenever the stirrup is set into the Beam, the standard bars that suppose to snap to the bar segment of the stirrups automatically changed their location.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Take a closer look, I find that the constraint for Bar segment of the standard bars have changed automatically and unexpectedly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="constarint_correct.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657417iDDC4025A82395F58/image-size/large?v=v2&amp;amp;px=999" role="button" title="constarint_correct.png" alt="constarint_correct.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="constraint_wrong.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657418iD0B3BA9932130317/image-size/large?v=v2&amp;amp;px=999" role="button" title="constraint_wrong.png" alt="constraint_wrong.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It only happens with the straight shape (M_00 by default of Revit) and when the stirrups are added to the beam as shown below (I have splited the process into multiple commits)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="before the stirrups are added" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657419iA3C1CC72B4A76A3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="before_stirrups.png" alt="before the stirrups are added" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;before the stirrups are added&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="after the stirrup are added" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657420iD46663415979135B/image-size/large?v=v2&amp;amp;px=999" role="button" title="after_stirrups.png" alt="after the stirrup are added" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;after the stirrup are added&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to pick a face of the beam and explicitly set the constraint with &lt;FONT&gt;RebarConstraint&lt;/FONT&gt;.&lt;FONT&gt;ReplaceReferenceTargets(), but it didn't work with shape driven rebar.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Why is this happening? How can I control this with the RebarContraint and RebarconstrainedHandle ,or other solution if possible?&amp;nbsp;&lt;/SPAN&gt; Thank you all in advance.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2019 03:29:38 GMT</pubDate>
    <dc:creator>longt61</dc:creator>
    <dc:date>2019-07-15T03:29:38Z</dc:date>
    <item>
      <title>Rebar contraints change automatically</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-contraints-change-automatically/m-p/8908740#M41057</link>
      <description>&lt;P&gt;I am using Revit 2019 and have an issue with rebar constraint behaviors.&lt;/P&gt;&lt;P&gt;I created a tool to create and set rebar to a specific location inside a Beam element. When I use the default RebarBarType or other small bar type, the tool works fine. However, if I increase the bar type for the standard bar, whenever the stirrup is set into the Beam, the standard bars that suppose to snap to the bar segment of the stirrups automatically changed their location.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Take a closer look, I find that the constraint for Bar segment of the standard bars have changed automatically and unexpectedly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="constarint_correct.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657417iDDC4025A82395F58/image-size/large?v=v2&amp;amp;px=999" role="button" title="constarint_correct.png" alt="constarint_correct.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="constraint_wrong.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657418iD0B3BA9932130317/image-size/large?v=v2&amp;amp;px=999" role="button" title="constraint_wrong.png" alt="constraint_wrong.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It only happens with the straight shape (M_00 by default of Revit) and when the stirrups are added to the beam as shown below (I have splited the process into multiple commits)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="before the stirrups are added" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657419iA3C1CC72B4A76A3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="before_stirrups.png" alt="before the stirrups are added" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;before the stirrups are added&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="after the stirrup are added" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657420iD46663415979135B/image-size/large?v=v2&amp;amp;px=999" role="button" title="after_stirrups.png" alt="after the stirrup are added" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;after the stirrup are added&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to pick a face of the beam and explicitly set the constraint with &lt;FONT&gt;RebarConstraint&lt;/FONT&gt;.&lt;FONT&gt;ReplaceReferenceTargets(), but it didn't work with shape driven rebar.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Why is this happening? How can I control this with the RebarContraint and RebarconstrainedHandle ,or other solution if possible?&amp;nbsp;&lt;/SPAN&gt; Thank you all in advance.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 03:29:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-contraints-change-automatically/m-p/8908740#M41057</guid>
      <dc:creator>longt61</dc:creator>
      <dc:date>2019-07-15T03:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rebar contraints change automatically</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-contraints-change-automatically/m-p/8933952#M41058</link>
      <description>&lt;P&gt;I just figured out a walkaround for this problem&lt;/P&gt;&lt;P&gt;Each rebar has a handle that constrains itself to a :constraint candidate as you can read the document and explanation in this link: &lt;A title="rebar constraint" href="https://forums.autodesk.com/t5/revit-structure-forum/rebar-constraints-for-straight-shape-automatically-changed/td-p/8908732" target="_blank" rel="noopener"&gt;rebar constraint&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;By default, the rebar created by API has no preferred constraint (which will take priority above all other constraint candidates when rebar gets into its "snapping zone"). To solve my problem I have to :&lt;/P&gt;&lt;P&gt;- set the preferred constraint for the &lt;EM&gt;&lt;STRONG&gt;bar segment handle&lt;/STRONG&gt;&lt;/EM&gt; to upper face of the hosting beam (&lt;FONT&gt;RebarConstraintType&lt;/FONT&gt;.&lt;FONT&gt;FixedDistanceToHostFace&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;- set the&amp;nbsp;&lt;FONT&gt;offset&lt;/FONT&gt; to the face exactly as I wanted.&lt;/P&gt;&lt;P&gt;In my case, the reason only straight shape snap incorrectly is that the other shape (L shape, U shape...) has more than 1 &lt;EM&gt;&lt;STRONG&gt;bar segment handle&lt;/STRONG&gt; &lt;/EM&gt;so that the other handle can k&lt;FONT&gt;eep the bar in the same place so that it satisfied the offset&amp;nbsp; and constraint value.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Still, I haven't found any document that mention the exact distance for "snapping zone", except the API documentation&amp;nbsp;&lt;A title="here" href="https://www.revitapidocs.com/2019/32fe1ec6-ddb3-feac-f18c-8683b054f639.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt; that said the default snapping distance is:&lt;BR /&gt;- rebar radius from rebar center to host face&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;- the sum of 2 rebar radiuses from the first rebar center to the second rebar center.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;which is not true in my case.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 08:13:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-contraints-change-automatically/m-p/8933952#M41058</guid>
      <dc:creator>longt61</dc:creator>
      <dc:date>2019-07-27T08:13:48Z</dc:date>
    </item>
  </channel>
</rss>

