<?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 Get floor lines except span direction in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12834205#M4742</link>
    <description>&lt;P&gt;Hi, I want to get&amp;nbsp;floor lines except span direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a floor that have 4 edge lines and a span direction.&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="baekdi_0-1718182734645.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1374812i0AC409DB56E1497D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="baekdi_0-1718182734645.png" alt="baekdi_0-1718182734645.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I get lines with this code.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Sketch floorSketch = doc.GetElement(selectedFloor.SketchId) as Sketch;
List&amp;lt;ModelCurve&amp;gt; floorModelCurves = new List&amp;lt;ModelCurve&amp;gt;();

foreach (ElementId id in floorSketch.GetAllElements())
{
    Element el = CommonVariable.CurrentDocument.GetElement(id);
    if (el is ModelCurve)
    {
        floorModelCurves.Add(el as ModelCurve);
    }

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;floorModelCurves's count is 5 including span direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to except span direction using model line's Name ("Span Direction Edge")&lt;/P&gt;&lt;P&gt;But in Revit Korean version, the name is not same with in English Version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I determine the model line is 'span direction' or not?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2024 09:04:52 GMT</pubDate>
    <dc:creator>baekdi</dc:creator>
    <dc:date>2024-06-12T09:04:52Z</dc:date>
    <item>
      <title>Get floor lines except span direction</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12834205#M4742</link>
      <description>&lt;P&gt;Hi, I want to get&amp;nbsp;floor lines except span direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a floor that have 4 edge lines and a span direction.&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="baekdi_0-1718182734645.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1374812i0AC409DB56E1497D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="baekdi_0-1718182734645.png" alt="baekdi_0-1718182734645.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I get lines with this code.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Sketch floorSketch = doc.GetElement(selectedFloor.SketchId) as Sketch;
List&amp;lt;ModelCurve&amp;gt; floorModelCurves = new List&amp;lt;ModelCurve&amp;gt;();

foreach (ElementId id in floorSketch.GetAllElements())
{
    Element el = CommonVariable.CurrentDocument.GetElement(id);
    if (el is ModelCurve)
    {
        floorModelCurves.Add(el as ModelCurve);
    }

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;floorModelCurves's count is 5 including span direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to except span direction using model line's Name ("Span Direction Edge")&lt;/P&gt;&lt;P&gt;But in Revit Korean version, the name is not same with in English Version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I determine the model line is 'span direction' or not?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 09:04:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12834205#M4742</guid>
      <dc:creator>baekdi</dc:creator>
      <dc:date>2024-06-12T09:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get floor lines except span direction</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12834259#M4743</link>
      <description>&lt;P&gt;Wouldn't it be easier to obtain the floor edges directly from the floor geometry, instead of its sketch? You could retrieve the floor solid, navigate to the top face (facing upwards) and query it for its face and edges. That ought to provide exactly what you are asking for. Have you used RevitLookup to explore the various floor properties and geometry? The newest release of RevitLookup includes new functionality for geometry visualisation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://github.com/jeremytammik/RevitLookup/releases/tag/2025.0.5" target="_blank"&gt;https://github.com/jeremytammik/RevitLookup/releases/tag/2025.0.5&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 09:33:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12834259#M4743</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-06-12T09:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get floor lines except span direction</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12834263#M4744</link>
      <description>&lt;P&gt;Here are two articles by The Building Coder on obtaining the top faces of a wall that might help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2011/07/top-faces-of-wall.html" target="_blank"&gt;Top Faces of Sloped Wall&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2011/12/top-faces-of-sloped-wall-update.html" target="_blank"&gt;Top Faces of Sloped Wall Update&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 09:35:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12834263#M4744</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-06-12T09:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Get floor lines except span direction</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12835424#M4745</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt;unfortunately element geometry tends to return only the joined solid, which will result in extra lines they may not want.&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13224847"&gt;@baekdi&lt;/a&gt;two options, first instead of looking for modelcurves first, look for Model Lines, and filter by Name, heres the Revit Lookup result for a similar slab:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ctm_mka_0-1718209957201.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1375090iAF58EE9C3D143776/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ctm_mka_0-1718209957201.png" alt="ctm_mka_0-1718209957201.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Second option revise your code to look at the profile which only returns the four lines:&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;&lt;LI-CODE lang="csharp"&gt;Sketch floorsketch = _doc.GetElement(testfloor.SketchId) as Sketch;
foreach (CurveArray curvarr in floorsketch.Profile)
{
    foreach (Line test in curvarr)
    {
        floorModelCurves.Add(test);
    }
}&lt;/LI-CODE&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;&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="ctm_mka_1-1718210119164.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1375091i4DBDC1899EEB5CB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ctm_mka_1-1718210119164.png" alt="ctm_mka_1-1718210119164.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;One caveat to both methods you should be aware of, any interior boundaries will show up in the list.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 16:37:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12835424#M4745</guid>
      <dc:creator>ctm_mka</dc:creator>
      <dc:date>2024-06-12T16:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get floor lines except span direction</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12835592#M4746</link>
      <description>&lt;P&gt;I believe span direction curve does not define slop direction. thus we can take this parameter as medium to define the curve is span curve or not.&lt;/P&gt;&lt;P&gt;see this example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var modelLines = floor.GetDependentElements(new CurveElementFilter(CurveElementType.ModelCurve));
List&amp;lt;Curve&amp;gt; curves = new List&amp;lt;Curve&amp;gt;();
foreach (var modelCurveId in modelLines)
{
    var modelCurve = Doc.GetElement(modelCurveId) as ModelCurve   ;
    var canDefineSlop = modelCurve.get_Parameter(BuiltInParameter.CURVE_IS_SLOPE_DEFINING) != null;
    if(canDefineSlop)
    {
        curves.Add(modelCurve.GeometryCurve);

    }
    else
    {
        // ignore Span direction curve
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let us know your findings&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 18:01:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12835592#M4746</guid>
      <dc:creator>Moustafa_K</dc:creator>
      <dc:date>2024-06-12T18:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get floor lines except span direction</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12836011#M4747</link>
      <description>&lt;P&gt;I solved this problem with your second option.&lt;/P&gt;&lt;P&gt;And I get curve's Model line ID by curve.Reference.ElementId because I need Model Line id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you all!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 21:58:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-floor-lines-except-span-direction/m-p/12836011#M4747</guid>
      <dc:creator>baekdi</dc:creator>
      <dc:date>2024-06-12T21:58:39Z</dc:date>
    </item>
  </channel>
</rss>

