<?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 Set Ceiling width value in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491832#M16203</link>
    <description>&lt;P&gt;Greetings from perú!&lt;/P&gt;&lt;P&gt;For this opportunity, I'm looking to change the ceiling thickness:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="miguelBW5DE_0-1666129158104.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1129000iF3DDBE3949838114/image-size/medium?v=v2&amp;amp;px=400" role="button" title="miguelBW5DE_0-1666129158104.png" alt="miguelBW5DE_0-1666129158104.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so far I've managed to get the width value but I still confused about the appropriate syntax to change the width value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;			List&amp;lt;HostObjAttributes&amp;gt; ceilings = new FilteredElementCollector(doc).WhereElementIsElementType().OfCategory(BuiltInCategory.OST_Ceilings).Cast&amp;lt;HostObjAttributes&amp;gt;().Where(ceiling=&amp;gt;ceiling.GetCompoundStructure() != null).ToList();
			foreach (HostObjAttributes ceiling in ceilings) {
				//stb.AppendLine(ceiling.Name);
				if (ceiling.Name =="Soffit Only Above Cabinets - H10\"") {
					IList&amp;lt;CompoundStructureLayer&amp;gt; layers = ceiling.GetCompoundStructure().GetLayers();
					foreach (var layer in layers) {
						layer.Width = 3; 
						
						
					}
					
				}
				
				
			}&lt;/LI-CODE&gt;&lt;P&gt;After running the script, the ceiling thickness does not change. I would appreciate some help on this one. Thanks in advance.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Miguel G&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2022 21:41:45 GMT</pubDate>
    <dc:creator>miguelBW5DE</dc:creator>
    <dc:date>2022-10-18T21:41:45Z</dc:date>
    <item>
      <title>Set Ceiling width value</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491832#M16203</link>
      <description>&lt;P&gt;Greetings from perú!&lt;/P&gt;&lt;P&gt;For this opportunity, I'm looking to change the ceiling thickness:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="miguelBW5DE_0-1666129158104.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1129000iF3DDBE3949838114/image-size/medium?v=v2&amp;amp;px=400" role="button" title="miguelBW5DE_0-1666129158104.png" alt="miguelBW5DE_0-1666129158104.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so far I've managed to get the width value but I still confused about the appropriate syntax to change the width value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;			List&amp;lt;HostObjAttributes&amp;gt; ceilings = new FilteredElementCollector(doc).WhereElementIsElementType().OfCategory(BuiltInCategory.OST_Ceilings).Cast&amp;lt;HostObjAttributes&amp;gt;().Where(ceiling=&amp;gt;ceiling.GetCompoundStructure() != null).ToList();
			foreach (HostObjAttributes ceiling in ceilings) {
				//stb.AppendLine(ceiling.Name);
				if (ceiling.Name =="Soffit Only Above Cabinets - H10\"") {
					IList&amp;lt;CompoundStructureLayer&amp;gt; layers = ceiling.GetCompoundStructure().GetLayers();
					foreach (var layer in layers) {
						layer.Width = 3; 
						
						
					}
					
				}
				
				
			}&lt;/LI-CODE&gt;&lt;P&gt;After running the script, the ceiling thickness does not change. I would appreciate some help on this one. Thanks in advance.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Miguel G&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 21:41:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491832#M16203</guid>
      <dc:creator>miguelBW5DE</dc:creator>
      <dc:date>2022-10-18T21:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Ceiling width value</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491864#M16204</link>
      <description>&lt;P&gt;Where there is a Get there is usually a Set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Get returns a detached copy which you need to return back with changes made, you have two 'Gets' there in the above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you have various 'Sets' also for your 3-foot-deep ceiling layer to take effect:&lt;/P&gt;&lt;P&gt;CompoundStructure.SetLayers&lt;BR /&gt;or perhaps&lt;BR /&gt;CompoundStructure.SetLayerWidth&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;HostObjAttributes.SetCompoundStructure&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 21:59:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491864#M16204</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2022-10-18T21:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set Ceiling width value</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491881#M16205</link>
      <description>&lt;P&gt;Hi Richard, nice to hear from you again. Thanks for your prompt reply. I even tried this syntax and do not work at all:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;			List&amp;lt;HostObjAttributes&amp;gt; ceilings = new FilteredElementCollector(doc).WhereElementIsElementType().OfCategory(BuiltInCategory.OST_Ceilings).Cast&amp;lt;HostObjAttributes&amp;gt;().Where(ceiling=&amp;gt;ceiling.GetCompoundStructure() != null).ToList();
			foreach (HostObjAttributes ceiling in ceilings) {
				//stb.AppendLine(ceiling.Name);
				if (ceiling.Name =="Soffit Only Above Cabinets - H10\"") {
					CompoundStructure compStr = ceiling.GetCompoundStructure();
					int indexCore = compStr.GetFirstCoreLayerIndex();
					compStr.SetLayerWidth(indexCore,7);
					stb.AppendLine(indexCore.ToString());
				}
			}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will check out what you have suggested right now&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 22:10:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491881#M16205</guid>
      <dc:creator>miguelBW5DE</dc:creator>
      <dc:date>2022-10-18T22:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set Ceiling width value</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491895#M16206</link>
      <description>&lt;P&gt;Thank you Richard you are the boss! what I was missing in the last portion of code was " ceiling.&lt;SPAN&gt;SetCompoundStructure&lt;/SPAN&gt;(compStr);"&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best!&lt;/P&gt;&lt;P&gt;Miguel G.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 22:15:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-ceiling-width-value/m-p/11491895#M16206</guid>
      <dc:creator>miguelBW5DE</dc:creator>
      <dc:date>2022-10-18T22:15:16Z</dc:date>
    </item>
  </channel>
</rss>

