<?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 create a wall without a Location line? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11758253#M13857</link>
    <description>&lt;P&gt;Thank you for your patience. However, I have got another question here, and maybe you could help me ! If I use the PostCommand like the code in the below pic, is it possible to use specific wall type（Which I created） in the postcommand？&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="871829861_0-1676512328403.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1177162iCB33382E4931C138/image-size/medium?v=v2&amp;amp;px=400" role="button" title="871829861_0-1676512328403.png" alt="871829861_0-1676512328403.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have learned that the PostCommand has "PostableCommand.ArchitecturalWall" to create the wall, which only use the default wall type. I just want to try to create a wall like the original Revit UI actions do ,not create a specific curve in the code (We don't know where should the wall place before we see the&amp;nbsp;Design drawings，right? ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your attentions again!&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2023 01:56:33 GMT</pubDate>
    <dc:creator>MasterYakult</dc:creator>
    <dc:date>2023-02-16T01:56:33Z</dc:date>
    <item>
      <title>How to create a wall without a Location line?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11755379#M13853</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear experts and scholars,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am working on Revit API based on Revit 2018. In my project, I need to instantiate and place the wall type which I created. As we all know, we could place a wall by using these methods in the pic below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="871829861_0-1676427143836.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1176568iF392D1FC81CFA3B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="871829861_0-1676427143836.png" alt="871829861_0-1676427143836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, I would like to make it more convenient for practical work by create wall without creating any LocationCurve first. I would like to make it more like the original Revit UI create wall method, which could place the wall by following the mouse.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="871829861_1-1676427143838.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1176567iFF5E8DEE3E8C6C40/image-size/medium?v=v2&amp;amp;px=400" role="button" title="871829861_1-1676427143838.png" alt="871829861_1-1676427143838.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What kind of code should I use to achieve this effect? I've been searching online for a long time, but I can't find anything useful. Thanks for your attentions! Somebody helps, please!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 02:16:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11755379#M13853</guid>
      <dc:creator>MasterYakult</dc:creator>
      <dc:date>2023-02-15T02:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a wall without a Location line?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11755515#M13854</link>
      <description>&lt;P&gt;I think the API was not made like that. Even the action of placing a wall with the mouse is in fact placing a curve first.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 04:02:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11755515#M13854</guid>
      <dc:creator>Yien_Chao</dc:creator>
      <dc:date>2023-02-15T04:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a wall without a Location line?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11755598#M13855</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13446775"&gt;@MasterYakult&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the Revit Lookup tool to snoop your wall created in the UI. Just as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2591481"&gt;@Yien_Chao&lt;/a&gt;&amp;nbsp; has said, you will find that Revit UI uses the Curves to create a wall. This is also defined in the documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A sample code to create a simple wall&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            var uiapp = commandData.Application;
            var uidoc = uiapp.ActiveUIDocument;
            var app = uiapp.Application;
            var document = uidoc.Document;


            //--GET Level
            var filter_level = new FilteredElementCollector(document)
                .WhereElementIsNotElementType()
                .OfCategory(BuiltInCategory.INVALID)
            .OfClass(typeof(Level));
            Element firstlevel = filter_level.FirstElement();
            if (firstlevel != null)
            {
                using (Transaction tran = new Transaction(document))
                {
                    tran.Start("Creating and Placing Wall");
                    //Create Points
                    XYZ start=new XYZ(0, 0, 0);
                    XYZ end = new XYZ(10, 0, 0);

                    //Create Line
                    Line geomline = Line.CreateBound(start, end);

                    //Create Wall
                    Wall.Create(document, geomline, firstlevel.Id, true);
                    TaskDialog.Show("revit", "Wall Created successfully!");
                    tran.Commit();
                }
            }
            return Result.Succeeded;
        }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 05:11:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11755598#M13855</guid>
      <dc:creator>moturi.magati.george</dc:creator>
      <dc:date>2023-02-15T05:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a wall without a Location line?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11758228#M13856</link>
      <description>&lt;P&gt;OK, I got it.Thank you for your patience.&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 01:38:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11758228#M13856</guid>
      <dc:creator>MasterYakult</dc:creator>
      <dc:date>2023-02-16T01:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a wall without a Location line?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11758253#M13857</link>
      <description>&lt;P&gt;Thank you for your patience. However, I have got another question here, and maybe you could help me ! If I use the PostCommand like the code in the below pic, is it possible to use specific wall type（Which I created） in the postcommand？&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="871829861_0-1676512328403.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1177162iCB33382E4931C138/image-size/medium?v=v2&amp;amp;px=400" role="button" title="871829861_0-1676512328403.png" alt="871829861_0-1676512328403.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have learned that the PostCommand has "PostableCommand.ArchitecturalWall" to create the wall, which only use the default wall type. I just want to try to create a wall like the original Revit UI actions do ,not create a specific curve in the code (We don't know where should the wall place before we see the&amp;nbsp;Design drawings，right? ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your attentions again!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 01:56:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11758253#M13857</guid>
      <dc:creator>MasterYakult</dc:creator>
      <dc:date>2023-02-16T01:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a wall without a Location line?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11760294#M13858</link>
      <description>&lt;P&gt;You can use &lt;A href="https://apidocs.co/apps/revit/2022.1/f9bf4ed3-0354-6bc1-6db3-e34fcbace950.htm" target="_blank" rel="noopener"&gt;UIDocument.&lt;/A&gt;&lt;SPAN&gt;&lt;A href="https://apidocs.co/apps/revit/2022.1/f9bf4ed3-0354-6bc1-6db3-e34fcbace950.htm" target="_blank" rel="noopener"&gt;PostRequestForElementTypePlacement&lt;/A&gt;&amp;nbsp;to place your wall type.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 18:01:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11760294#M13858</guid>
      <dc:creator>mhannonQ65N2</dc:creator>
      <dc:date>2023-02-16T18:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a wall without a Location line?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11761082#M13859</link>
      <description>&lt;P&gt;Okay,I would try it later.Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 01:02:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-wall-without-a-location-line/m-p/11761082#M13859</guid>
      <dc:creator>MasterYakult</dc:creator>
      <dc:date>2023-02-17T01:02:33Z</dc:date>
    </item>
  </channel>
</rss>

