


{"id":427021,"date":"2025-03-26T21:29:40","date_gmt":"2025-03-26T21:29:40","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/thermal-desktop-opentd-bulk-editing-of-elements-without-for-or-foreach-loop\/"},"modified":"2025-03-26T21:29:40","modified_gmt":"2025-03-26T21:29:40","slug":"thermal-desktop-opentd-bulk-editing-of-elements-without-for-or-foreach-loop","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/thermal-desktop-opentd-bulk-editing-of-elements-without-for-or-foreach-loop\/","title":{"rendered":"[Thermal Desktop] [OpenTD] Bulk editing of elements without for or foreach loop"},"content":{"rendered":"<p>&lt;p&gt;Using OpenTD, is there a way to edit multiple elements without using a for or foreach loop (which essentially edits them one at at time) when these elements are somehow grouped (either in a submodel, layer, domain, etc.)? I know it&#8217;s possible to do this bulk editing within Thermal Desktop, and I&#8217;m looking at how to do this efficiently in C#.&lt;br&gt;&lt;br&gt;From the Getting Started manual, I&#8217;ve seen this done with a foreach loop:&lt;\/p&gt;&lt;p class=&#8221;p1&#8243;&gt;foreach (LinearQuad q in quads)&lt;br&gt;{&lt;br&gt;q.CondSubmodel = submodel;&lt;br&gt;q.TopThickness = 0.01;&lt;br&gt;q.Update();&lt;br&gt;}&lt;br&gt;&lt;br&gt;Additionally, in the code I&#8217;m writing, what I&#8217;m interested in is similarly implemented.&lt;br&gt;myElementList.ForEach(e =&gt;&nbsp;&lt;br&gt;{&lt;br&gt;e.ThermoMaterial = ThermoMaterialName;&lt;br&gt;e.Layer = Layer.Name;&lt;br&gt;e.Update();&lt;br&gt;}&lt;br&gt;&lt;br&gt;However, this method takes too long for my application and I&#8217;m hoping there&#8217;s a way to shorten the element editing time using some type of group editing.&lt;br&gt;&lt;br&gt;Thank you!&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-427021","topic","type-topic","status-publish","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27792"],"_bbp_topic_id":["427021"],"_bbp_subscription":["135666","51233"],"_bbp_author_ip":["184.105.185.35"],"_bbp_last_reply_id":["427271"],"_bbp_last_active_id":["427271"],"_bbp_last_active_time":["2025-03-28 22:52:57"],"_bbp_reply_count":["1"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["135666","51233"],"_btv_view_count":["126"],"_bbp_topic_status":["unanswered"]},"test":"mhaastamu-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/427021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/427021\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=427021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}