<?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: How to set the wall height? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8203548#M48262</link>
    <description>&lt;P&gt;Firstly, I just checked your code and run it on my side, it seems good to set the offset &amp;amp; height&amp;nbsp;correctly to the new created wall, please see the following&amp;nbsp;screenshot as I got.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Create a wall" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/535359i99C22FA60CE3151D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-08-16 at 6.07.42 PM.png" alt="Create a wall" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Create a wall&lt;/span&gt;&lt;/span&gt;Also, there are some other parameters&amp;nbsp;you can use to set the height&amp;nbsp;in different way,&amp;nbsp;for example, set the top constraint by "WALL_HEIGHT_TYPE" to any level, and set the top offset with "WALL_TOP_OFFSET".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the API doc at &lt;A href="http://www.revitapidocs.com/2018.1/3ef7e31c-b41b-c8cc-2713-8f098954613d.htm" target="_blank"&gt;http://www.revitapidocs.com/2018.1/3ef7e31c-b41b-c8cc-2713-8f098954613d.htm&lt;/A&gt;&amp;nbsp;for details.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Aug 2018 10:25:38 GMT</pubDate>
    <dc:creator>zhong_wu</dc:creator>
    <dc:date>2018-08-16T10:25:38Z</dc:date>
    <item>
      <title>How to set the wall height?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8200112#M48260</link>
      <description>&lt;P&gt;I need export a wall, and then import and create the same wall.&lt;/P&gt;&lt;P&gt;I find the height related parameters are null or readonly, for the parameter which is not readonly, e.g. "Unconnected Height", the result is not the value I set, so how can I set the height of a wall ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my code as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Transaction(TransactionMode.Manual)]&lt;BR /&gt;public class CreateWallCmd : IExternalCommand&lt;BR /&gt;{&lt;BR /&gt;public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)&lt;BR /&gt;{&lt;BR /&gt;UIApplication uiapp = commandData.Application;&lt;BR /&gt;UIDocument uidoc = uiapp.ActiveUIDocument;&lt;BR /&gt;Application app = uiapp.Application;&lt;BR /&gt;Document doc = uidoc.Document;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;XYZ pt1 = new XYZ(0, 0, 0);&lt;BR /&gt;XYZ pt2 = new XYZ(10, 0, 0);&lt;BR /&gt;Line line = Line.CreateBound(pt1, pt2);&lt;BR /&gt;Level level= new FilteredElementCollector(doc)&lt;BR /&gt;.OfClass(typeof(Level))&lt;BR /&gt;.First&amp;lt;Element&amp;gt;(e =&amp;gt; e.Name.Equals("Level 1")) as Level;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Transaction act = new Transaction(doc, "Wall.Create");&lt;BR /&gt;act.Start();&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;Wall wall = Wall.Create(doc, line, level.Id, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parameter WALL_ATTR_HEIGHT_PARAM = wall.get_Parameter(BuiltInParameter.WALL_ATTR_HEIGHT_PARAM);&lt;BR /&gt;if (WALL_ATTR_HEIGHT_PARAM != null)&lt;BR /&gt;{&lt;BR /&gt;if (!WALL_ATTR_HEIGHT_PARAM.IsReadOnly)&lt;BR /&gt;{&lt;BR /&gt;WALL_ATTR_HEIGHT_PARAM.Set(100);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parameter WALL_BASE_HEIGHT_PARAM = wall.get_Parameter(BuiltInParameter.WALL_BASE_HEIGHT_PARAM);&lt;BR /&gt;if (WALL_BASE_HEIGHT_PARAM != null)&lt;BR /&gt;{&lt;BR /&gt;if (!WALL_BASE_HEIGHT_PARAM.IsReadOnly)&lt;BR /&gt;{&lt;BR /&gt;WALL_BASE_HEIGHT_PARAM.Set(100);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parameter WALL_BASE_OFFSET = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET);&lt;BR /&gt;if (WALL_BASE_OFFSET != null)&lt;BR /&gt;{&lt;BR /&gt;if (!WALL_BASE_OFFSET.IsReadOnly)&lt;BR /&gt;{&lt;BR /&gt;WALL_BASE_OFFSET.Set(50);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parameter WALL_TOP_OFFSET = wall.get_Parameter(BuiltInParameter.WALL_TOP_OFFSET);&lt;BR /&gt;if (WALL_TOP_OFFSET != null)&lt;BR /&gt;{&lt;BR /&gt;if (!WALL_TOP_OFFSET.IsReadOnly)&lt;BR /&gt;{&lt;BR /&gt;WALL_TOP_OFFSET.Set(100);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IList&amp;lt;Parameter&amp;gt; UnconnectedHeigth_Params = wall.GetParameters("Unconnected Height");&lt;BR /&gt;if (UnconnectedHeigth_Params.Count &amp;gt; 0)&lt;BR /&gt;{&lt;BR /&gt;if (!UnconnectedHeigth_Params[0].IsReadOnly)&lt;BR /&gt;{&lt;BR /&gt;// can set, but the result is not 100&lt;BR /&gt;UnconnectedHeigth_Params[0].Set(100);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (System.Exception e)&lt;BR /&gt;{&lt;BR /&gt;TaskDialog.Show("Exception", e.Message);&lt;BR /&gt;}&lt;BR /&gt;act.Commit();&lt;BR /&gt;return Result.Succeeded;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 03:46:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8200112#M48260</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-15T03:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the wall height?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8201367#M48261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try with below code for walls creation.&amp;nbsp; You can set the height directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.revitapidocs.com/2015/0ce4c555-4cee-f5fd-2e84-43cacf34ac5c.htm" target="_blank"&gt;http://www.revitapidocs.com/2015/0ce4c555-4cee-f5fd-2e84-43cacf34ac5c.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="keyword"&gt;static&lt;/SPAN&gt; &lt;A href="http://www.revitapidocs.com/2015/b5891733-c602-12df-beab-da414b58d608.htm" target="_blank"&gt;Wall&lt;/A&gt; &lt;SPAN class="identifier"&gt;Create&lt;/SPAN&gt;(
	&lt;A href="http://www.revitapidocs.com/2015/db03274b-a107-aa32-9034-f3e0df4bb1ec.htm" target="_blank"&gt;Document&lt;/A&gt; &lt;SPAN class="parameter"&gt;document&lt;/SPAN&gt;,
	&lt;A href="http://www.revitapidocs.com/2015/400cc9b6-9ff7-de85-6fd8-c20002209d25.htm" target="_blank"&gt;Curve&lt;/A&gt; &lt;SPAN class="parameter"&gt;curve&lt;/SPAN&gt;,
	&lt;A href="http://www.revitapidocs.com/2015/44f3f7b1-3229-3404-93c9-dc5e70337dd6.htm" target="_blank"&gt;ElementId&lt;/A&gt; &lt;SPAN class="parameter"&gt;wallTypeId&lt;/SPAN&gt;,
	&lt;A href="http://www.revitapidocs.com/2015/44f3f7b1-3229-3404-93c9-dc5e70337dd6.htm" target="_blank"&gt;ElementId&lt;/A&gt; &lt;SPAN class="parameter"&gt;levelId&lt;/SPAN&gt;,
	&lt;A href="http://msdn2.microsoft.com/en-us/library/643eft0t" target="_blank"&gt;double&lt;/A&gt; &lt;SPAN class="parameter"&gt;height&lt;/SPAN&gt;,
	&lt;A href="http://msdn2.microsoft.com/en-us/library/643eft0t" target="_blank"&gt;double&lt;/A&gt; &lt;SPAN class="parameter"&gt;offset&lt;/SPAN&gt;,
	&lt;A href="http://msdn2.microsoft.com/en-us/library/a28wyd50" target="_blank"&gt;bool&lt;/A&gt; &lt;SPAN class="parameter"&gt;flip&lt;/SPAN&gt;,
	&lt;A href="http://msdn2.microsoft.com/en-us/library/a28wyd50" target="_blank"&gt;bool&lt;/A&gt; &lt;SPAN class="parameter"&gt;structural&lt;/SPAN&gt;
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer the below link for walls&amp;nbsp;creation. We can find a lot of solution in thebuildingcoder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2017/11/automatic-wall-creation.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2017/11/automatic-wall-creation.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Eden Oo&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;</description>
      <pubDate>Wed, 15 Aug 2018 14:31:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8201367#M48261</guid>
      <dc:creator>thannaingoo.api</dc:creator>
      <dc:date>2018-08-15T14:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the wall height?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8203548#M48262</link>
      <description>&lt;P&gt;Firstly, I just checked your code and run it on my side, it seems good to set the offset &amp;amp; height&amp;nbsp;correctly to the new created wall, please see the following&amp;nbsp;screenshot as I got.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Create a wall" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/535359i99C22FA60CE3151D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-08-16 at 6.07.42 PM.png" alt="Create a wall" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Create a wall&lt;/span&gt;&lt;/span&gt;Also, there are some other parameters&amp;nbsp;you can use to set the height&amp;nbsp;in different way,&amp;nbsp;for example, set the top constraint by "WALL_HEIGHT_TYPE" to any level, and set the top offset with "WALL_TOP_OFFSET".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the API doc at &lt;A href="http://www.revitapidocs.com/2018.1/3ef7e31c-b41b-c8cc-2713-8f098954613d.htm" target="_blank"&gt;http://www.revitapidocs.com/2018.1/3ef7e31c-b41b-c8cc-2713-8f098954613d.htm&lt;/A&gt;&amp;nbsp;for details.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 10:25:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8203548#M48262</guid>
      <dc:creator>zhong_wu</dc:creator>
      <dc:date>2018-08-16T10:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the wall height?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8210826#M48263</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I can set the height of the wall now, but the result puzzle me a little. That is, I set the height to 100 in VS, but the result is 30480 in revit. screenshot attached as below.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/536575i715E3C6409B3BF9A/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.png" alt="11.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="22.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/536577i4E049CE5E44A2CEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="22.png" alt="22.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 11:53:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8210826#M48263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-20T11:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the wall height?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8210852#M48264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;
&lt;P&gt;In code what you are giving is in feet (i.e)100 feet&lt;/P&gt;
&lt;P&gt;but in Revit it is showing the units in millimeter(mm).&lt;/P&gt;
&lt;P&gt;If you want everything in feet you can change the unit settings in Revit&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 12:10:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8210852#M48264</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2018-08-20T12:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the wall height?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8211379#M48265</link>
      <description>&lt;P&gt;Got it, thank you very much !&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:54:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-set-the-wall-height/m-p/8211379#M48265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-20T14:54:36Z</dc:date>
    </item>
  </channel>
</rss>

