<?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: project Curves to a view in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13689760#M84146</link>
    <description>&lt;P&gt;A few things to check. First, try converting using source_level o verify its working at all, im not seeing anything in your code that is translating the lines to the next_level. Do you you use Revit Lookup. If not, i highly recommend. I mention this as your code appears correct for a Floor element, but does a Roof behave the same/have the same properties? I work in structures, where we don't use Roofs, so i cannot confirm this. Next, have you verified your curve_array is being populated correctly? Lastly, have you considered getting the Sketch lines vs the face/edge curves? They maybe easier to get at. .&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jun 2025 18:48:48 GMT</pubDate>
    <dc:creator>ctm_mka</dc:creator>
    <dc:date>2025-06-19T18:48:48Z</dc:date>
    <item>
      <title>project Curves to a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13689540#M84145</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I'am trying to project curves retrieves from the edges of a roof to the plan view above the roof. To do So I would like to use the &lt;SPAN&gt;ConvertModelToDetailCurves&lt;/SPAN&gt;, however I havn't found any code snippet using that method in python.&lt;/P&gt;&lt;P&gt;Here is my code :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"""MAIN PROCESS"""&lt;/SPAN&gt;&lt;BR /&gt;debug = []&lt;BR /&gt;&lt;BR /&gt;roofs_collector =&amp;nbsp;&lt;SPAN&gt;FilteredElementCollector&lt;/SPAN&gt;(doc).&lt;SPAN&gt;OfCategory&lt;/SPAN&gt;(BuiltInCategory.OST_Roofs).&lt;SPAN&gt;WhereElementIsNotElementType&lt;/SPAN&gt;()&lt;BR /&gt;&lt;BR /&gt;views =&amp;nbsp;&lt;SPAN&gt;FilteredElementCollector&lt;/SPAN&gt;(doc).&lt;SPAN&gt;OfClass&lt;/SPAN&gt;(View).&lt;SPAN&gt;WhereElementIsNotElementType&lt;/SPAN&gt;()&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&amp;nbsp;roof&amp;nbsp;&lt;SPAN&gt;in&lt;/SPAN&gt;&amp;nbsp;roofs_collector:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geometry_elements = roof.&lt;SPAN&gt;get_Geometry&lt;/SPAN&gt;(&lt;SPAN&gt;Options&lt;/SPAN&gt;())&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;source_level = roof.LevelId&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;next_level =&amp;nbsp;&lt;SPAN&gt;get_level_above&lt;/SPAN&gt;(source_level)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;next_level_view =&amp;nbsp;&lt;SPAN&gt;get_view_from_level&lt;/SPAN&gt;(doc,next_level)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;debug.&lt;SPAN&gt;append&lt;/SPAN&gt;(next_level_view)&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;for&lt;/SPAN&gt;&amp;nbsp;geometry_element&amp;nbsp;&lt;SPAN&gt;in&lt;/SPAN&gt;&amp;nbsp;geometry_elements:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;for&lt;/SPAN&gt;&amp;nbsp;face&amp;nbsp;&lt;SPAN&gt;in&lt;/SPAN&gt;&amp;nbsp;geometry_element.Faces:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;face_normal = face.&lt;SPAN&gt;ComputeNormal&lt;/SPAN&gt;(&lt;SPAN&gt;UV&lt;/SPAN&gt;(&lt;SPAN&gt;0.5&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;0.5&lt;/SPAN&gt;))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;if&lt;/SPAN&gt;&amp;nbsp;face_normal.Z &amp;gt;&amp;nbsp;&lt;SPAN&gt;0.5&lt;/SPAN&gt;:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;edgeLoops = face.&lt;SPAN&gt;GetEdgesAsCurveLoops&lt;/SPAN&gt;()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;for&lt;/SPAN&gt;&amp;nbsp;curveLoop&amp;nbsp;&lt;SPAN&gt;in&lt;/SPAN&gt;&amp;nbsp;edgeLoops:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;curve_array =&amp;nbsp;&lt;SPAN&gt;CurveArray&lt;/SPAN&gt;()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;for&lt;/SPAN&gt;&amp;nbsp;curve&amp;nbsp;&lt;SPAN&gt;in&lt;/SPAN&gt;&amp;nbsp;curveLoop:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;curve_array.&lt;SPAN&gt;Append&lt;/SPAN&gt;(curve)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.&lt;SPAN&gt;ConvertModelToDetailCurves&lt;/SPAN&gt;(next_level_view, curve_array)&lt;BR /&gt;&lt;BR /&gt;However the last line is certainly wrong since I got the error message : Avertissement:TypeError : No method matches given arguments for ConvertModelToDetailCurves: (&amp;lt;class 'Autodesk.Revit.DB.ViewPlan'&amp;gt;, &amp;lt;class 'Autodesk.Revit.DB.CurveArray'&amp;gt;) [' File "&amp;lt;string&amp;gt;", line 95, in &amp;lt;module&amp;gt;\n']&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does someone has any idea on how to call the &lt;SPAN&gt;ConvertModelToDetailCurves&lt;/SPAN&gt; method in python ?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 15:59:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13689540#M84145</guid>
      <dc:creator>Leo_CourvalKVP86</dc:creator>
      <dc:date>2025-06-19T15:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: project Curves to a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13689760#M84146</link>
      <description>&lt;P&gt;A few things to check. First, try converting using source_level o verify its working at all, im not seeing anything in your code that is translating the lines to the next_level. Do you you use Revit Lookup. If not, i highly recommend. I mention this as your code appears correct for a Floor element, but does a Roof behave the same/have the same properties? I work in structures, where we don't use Roofs, so i cannot confirm this. Next, have you verified your curve_array is being populated correctly? Lastly, have you considered getting the Sketch lines vs the face/edge curves? They maybe easier to get at. .&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 18:48:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13689760#M84146</guid>
      <dc:creator>ctm_mka</dc:creator>
      <dc:date>2025-06-19T18:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: project Curves to a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13690486#M84150</link>
      <description>&lt;P&gt;Hi, thanks for your response.&lt;/P&gt;&lt;P&gt;I’ve installed RevitLookup, but as a beginner with the Revit API, the tool isn’t very intuitive for me yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After rereading the warning I received, I think the error is due to passing a CurveArray to the ConvertModelToDetailCurves method, which actually expects a ModelCurveArray. So I tried converting my CurveArray accordingly, but then got another error saying the curves must lie on the same plane as the sketch— which they don’t in my case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’ll now try your suggestion of retrieving the roof sketch. However, I’m working with a FootPrintRoof, and I haven’t found a simple way to access its sketch. In this 2010 blog post &lt;A href="https://thebuildingcoder.typepad.com/blog/2010/11/access-to-sketch-and-sketch-plane.html" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2010/11/access-to-sketch-and-sketch-plane.html&lt;/A&gt;, Jeremy mentions deleting the roof to get the sketch ID. Since that’s a pretty old workaround, is there a better way nowadays to access the sketch of a FootPrintRoof?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 08:27:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13690486#M84150</guid>
      <dc:creator>Leo_CourvalKVP86</dc:creator>
      <dc:date>2025-06-20T08:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: project Curves to a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13691145#M84152</link>
      <description>&lt;P&gt;ah ha! given that you received the error about curves on the wrong plane, please try running your code with model curve array using your "source_level". That behavior screams "needs translation" to me. By which I mean you need to translate your elements to the desired plane, probably after converting them. as far as finding the sketch of the roof, using lookup, this is what it looks like for a floor, hopefully its something similar:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ctm_mka_0-1750432886914.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1545296iBE641B28CF48F89A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ctm_mka_0-1750432886914.png" alt="ctm_mka_0-1750432886914.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and code to access looks something like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; Sketch floorsketch = _doc.GetElement(testfloor.SketchId) as Sketch;
 foreach (CurveArray curvarr in floorsketch.Profile)
 {
    
 }&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Jun 2025 15:22:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13691145#M84152</guid>
      <dc:creator>ctm_mka</dc:creator>
      <dc:date>2025-06-20T15:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: project Curves to a view</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13693719#M84163</link>
      <description>&lt;P&gt;Alright, thanks to my highly advanced RevitLookup skills (well, sort of ;-)), I discovered that the .GetProfiles() method gives me exactly what I need—namely, the roof profile in a plane parallel to the XY plane, in the form of a ModelCurveArrArray. So that’s perfect!&lt;/P&gt;&lt;P&gt;I’ve now completed what I wanted to do on that front.&lt;/P&gt;&lt;P&gt;Just one small hiccup at the end: Revit can be quite picky sometimes. The profile loops I get from my roofs are always closed (as expected, since the roof extrusion has already been created). However, after retrieving those curves, Revit tells me it can’t recreate a closed loop from them. I believe this is due to extremely tight tolerances—an error as small as 1e-10 might be enough to prevent the loop from closing properly.&lt;/P&gt;&lt;P&gt;Anyway, I found a workaround to close the loops, so everything's good now.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Leo_CourvalKVP86_0-1750681410689.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1545749i84B52ED4446FD9F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Leo_CourvalKVP86_0-1750681410689.png" alt="Leo_CourvalKVP86_0-1750681410689.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 12:35:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/project-curves-to-a-view/m-p/13693719#M84163</guid>
      <dc:creator>Leo_CourvalKVP86</dc:creator>
      <dc:date>2025-06-23T12:35:54Z</dc:date>
    </item>
  </channel>
</rss>

