<?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: Wall Modifier IUpdater in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9785393#M31355</link>
    <description>&lt;P&gt;You know with that kind of message it is somewhere in the Execute method. So you'll have to go a bit deeper than what you have shown for items such as&amp;nbsp;&lt;SPAN&gt;BuildingComponentClass.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know that you can 100% of the time avoid this message. Interactions with document changes due to other updaters and the failure handling process is never simple. How do you allow for what someone else has done and the changes they want to make with their updater?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Oct 2020 21:49:30 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2020-10-05T21:49:30Z</dc:date>
    <item>
      <title>Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9785265#M31354</link>
      <description>&lt;P&gt;I keep getting an error. Any advice? I'm just trying to place a door in the wall based on a parameter selection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public class Modify_Wall_Modeling : IUpdater&lt;BR /&gt;{&lt;BR /&gt;static AddInId m_appid;&lt;BR /&gt;static UpdaterId m_updaterId;&lt;/P&gt;&lt;P&gt;public Modify_Wall_Modeling(AddInId id)&lt;BR /&gt;{&lt;BR /&gt;m_appid = id;&lt;BR /&gt;m_updaterId = new UpdaterId(m_appid, new Guid("D1B8E39B-FE1E-4C99-949E-93B11B34A0CC"));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public void Execute(UpdaterData data)&lt;BR /&gt;{&lt;BR /&gt;#region updaterUI&lt;BR /&gt;Document doc = data.GetDocument();&lt;BR /&gt;//Autodesk.Revit.DB.View view = doc.ActiveView as Autodesk.Revit.DB.View;&lt;BR /&gt;//PhaseStandardTools phaseStandardTools = new PhaseStandardTools();&lt;BR /&gt;//CreateRoofSlab create_roof_slab = new CreateRoofSlab();&lt;BR /&gt;//RibbonPanelClass ribbon_panel_class = new RibbonPanelClass();&lt;BR /&gt;BuildingComponentClass bcc = new BuildingComponentClass();&lt;BR /&gt;BuildingComponentToolsClass bctc = new BuildingComponentToolsClass();&lt;/P&gt;&lt;P&gt;//FilteredElementCollector wall_collector = new FilteredElementCollector(doc,doc.ActiveView.Id).OfClass(typeof(Wall));&lt;/P&gt;&lt;P&gt;foreach (ElementId id in data.GetModifiedElementIds())&lt;BR /&gt;{&lt;BR /&gt;try&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;Wall wall = doc.GetElement(id) as Wall;&lt;/P&gt;&lt;P&gt;bcc.Wall_Modeling(wall, doc);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;catch&lt;BR /&gt;{&lt;BR /&gt;continue;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#endregion&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public string GetAdditionalInformation()&lt;BR /&gt;{&lt;BR /&gt;return "Wall Model Modify";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public ChangePriority GetChangePriority()&lt;BR /&gt;{&lt;BR /&gt;return ChangePriority.InteriorWalls;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public UpdaterId GetUpdaterId()&lt;BR /&gt;{&lt;BR /&gt;return m_updaterId;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public string GetUpdaterName()&lt;BR /&gt;{&lt;BR /&gt;return "Modify Wall Updater";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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-inline" image-alt="ryansC5XHQ_0-1601928423718.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/827339iB6919FBFB25754F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ryansC5XHQ_0-1601928423718.png" alt="ryansC5XHQ_0-1601928423718.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 20:07:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9785265#M31354</guid>
      <dc:creator>ryansC5XHQ</dc:creator>
      <dc:date>2020-10-05T20:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9785393#M31355</link>
      <description>&lt;P&gt;You know with that kind of message it is somewhere in the Execute method. So you'll have to go a bit deeper than what you have shown for items such as&amp;nbsp;&lt;SPAN&gt;BuildingComponentClass.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know that you can 100% of the time avoid this message. Interactions with document changes due to other updaters and the failure handling process is never simple. How do you allow for what someone else has done and the changes they want to make with their updater?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 21:49:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9785393#M31355</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-10-05T21:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9786352#M31356</link>
      <description>&lt;P&gt;IUpdater trigger is set to Element.ChangetypeAny(). I just wonder if inserting a door through the wall IUpdater is triggering another execute method before the first execute method is finished.&amp;nbsp; If that is the case, then I'm simply stumped?&amp;nbsp; I'm kind of glad to hear that I am not the only one dealing with this.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 10:32:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9786352#M31356</guid>
      <dc:creator>ryansC5XHQ</dc:creator>
      <dc:date>2020-10-06T10:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9786421#M31357</link>
      <description>&lt;P&gt;Possibly, your Execute method is performing an action that re-triggers your updater, thus entering an infinite loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could introduce a boolean variable in your Execute method to prevent it from starting such a recursive sequence.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the Idling event to reset your variable back again once the transaction has been committed and Revit has settled down again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 11:05:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9786421#M31357</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-10-06T11:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9786436#M31358</link>
      <description>&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;You are spot on, and that was what I was afraid of.&amp;nbsp; Very humble for your opinion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;blessings,&lt;/P&gt;&lt;P&gt;Ryan S.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 11:14:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9786436#M31358</guid>
      <dc:creator>ryansC5XHQ</dc:creator>
      <dc:date>2020-10-06T11:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9787043#M31359</link>
      <description>&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The boolean will stop the possible &lt;SPAN&gt;recursive sequence&lt;/SPAN&gt;, but I lose my door that is created. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ryan S&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 15:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9787043#M31359</guid>
      <dc:creator>ryansC5XHQ</dc:creator>
      <dc:date>2020-10-06T15:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9787060#M31360</link>
      <description>&lt;P&gt;That means that some step is cancelling the door creation step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check your return values from the Execute method. Oops; it is void.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually, the proper way to avoid a rersive call is to set the right level of change priority:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.revitapidocs.com/2020/494c6daa-617d-1bc2-b3a8-c4b817240b93.htm" target="_blank"&gt;https://www.revitapidocs.com/2020/494c6daa-617d-1bc2-b3a8-c4b817240b93.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="summary"&gt;Identifies the nature of the change the Updater will be performing. Used to identify order of execution of updaters. Called once during registration of the updater.&lt;/DIV&gt;
&lt;DIV class="summary"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="summary"&gt;Depending on the change priority, the updater will be executed sooner or later, and that will affect what updaters (including itself, maybe) may come after it has been executed.&lt;/DIV&gt;
&lt;DIV class="summary"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="summary"&gt;In most cases, you would want to set the change priority so that an updaters trigger is not fired by the changes made by the updater Execute.&lt;/DIV&gt;
&lt;DIV class="summary"&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Oct 2020 16:00:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9787060#M31360</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-10-06T16:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9787096#M31361</link>
      <description>&lt;P&gt;I'm all ears......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my method that returns a familyinstance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public FamilyInstance create_door_in_wall(Wall wall, string doortype_name, Document doc)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;ElementId level_id = wall.LevelId;&lt;/P&gt;&lt;P&gt;Level level = doc.GetElement(level_id) as Level;&lt;/P&gt;&lt;P&gt;Parameter p_wall_length = wall.get_Parameter(BuiltInParameter.CURVE_ELEM_LENGTH);&lt;/P&gt;&lt;P&gt;double wall_length = p_wall_length.AsDouble();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LocationCurve lc = wall.Location as LocationCurve;&lt;/P&gt;&lt;P&gt;Curve curve = lc.Curve as Curve;&lt;/P&gt;&lt;P&gt;Line line = curve as Line;&lt;/P&gt;&lt;P&gt;double end_point = curve.GetEndParameter(0);&lt;/P&gt;&lt;P&gt;double centerpoint_double = end_point + (wall_length / 2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;XYZ centerpoint = curve.Evaluate(centerpoint_double, false);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FamilySymbol fs = new FilteredElementCollector(doc).OfClass(typeof(FamilySymbol)).First(q =&amp;gt; q.Name == doortype_name) as FamilySymbol;&lt;/P&gt;&lt;P&gt;FamilyInstance fi = doc.Create.NewFamilyInstance(centerpoint, fs, wall, level, StructuralType.NonStructural);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wall.LookupParameter("Create Door").Set(0);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 16:11:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9787096#M31361</guid>
      <dc:creator>ryansC5XHQ</dc:creator>
      <dc:date>2020-10-06T16:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9788798#M31362</link>
      <description>&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to work out the bool for the IUpdater.&amp;nbsp; I IUpdater works perfectly inside a group and a door is created.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just a side note-I was able to verify the potential loop in the IUpdater when inside a group, but no loop present outside of a group edit mode. Stumped! lol&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-inline" image-alt="ryansC5XHQ_1-1602070376172.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/828156iE905DDEBC604FDE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ryansC5XHQ_1-1602070376172.png" alt="ryansC5XHQ_1-1602070376172.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;If I select a wall to outside of a group, I get the IUpdater error,see picture below.&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-inline" image-alt="ryansC5XHQ_0-1602070240343.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/828151i816F6103149B0903/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ryansC5XHQ_0-1602070240343.png" alt="ryansC5XHQ_0-1602070240343.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clues?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 11:43:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9788798#M31362</guid>
      <dc:creator>ryansC5XHQ</dc:creator>
      <dc:date>2020-10-07T11:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Modifier IUpdater</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9833068#M31363</link>
      <description>&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I found a solution. I simply raise an ExternalEvent (from inside the IUpdater) in the event-specific parameters are checked. If the wall is inside a group the IUpdater will do the trick!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 19:03:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/wall-modifier-iupdater/m-p/9833068#M31363</guid>
      <dc:creator>ryansC5XHQ</dc:creator>
      <dc:date>2020-10-29T19:03:46Z</dc:date>
    </item>
  </channel>
</rss>

