<?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: Sketch lines with floors in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7032424#M59314</link>
    <description>&lt;P&gt;Thank you so much for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can already relate the ID of the floor's with the sketch lines' ID.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2017 09:10:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-04-21T09:10:44Z</dc:date>
    <item>
      <title>Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/6983759#M59307</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a doubt with Revit API, we wanted to relate the floors with their sketch lines, it means,&amp;nbsp;when we get the ID of the lines that make up the floor we want to know the relation that has with the ID of that floor.&lt;/P&gt;&lt;P&gt;How could we do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are looking forward to your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 09:21:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/6983759#M59307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-30T09:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/6987422#M59308</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there is another thread about the relationship between an element and its sketch:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/filled-region-line-styles/m-p/5837481/highlight/true#M12040" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/filled-region-line-styles/m-p/5837481/highlight/true#M12040&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 14:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/6987422#M59308</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2017-03-31T14:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/6990905#M59309</link>
      <description>&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 08:52:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/6990905#M59309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-03T08:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7020481#M59310</link>
      <description>&lt;P&gt;Thank you so much. We have been checking this code but it has not been useful for us. We are&amp;nbsp;not able to&amp;nbsp;relate the sketch lines with the appropiate floor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone can help us, we would be very grateful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 11:10:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7020481#M59310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-17T11:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7021129#M59311</link>
      <description>&lt;P&gt;you can find the sketchlines with the TTT&amp;nbsp; (temporary transaction trick)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;            StringBuilder sb = new StringBuilder();
            Dictionary&amp;lt;Floor, List&amp;lt;ModelCurve&amp;gt;&amp;gt; dict_SketchLines = new Dictionary&amp;lt;Floor, List&amp;lt;ModelCurve&amp;gt;&amp;gt;();

            Document doc = revit.Application.ActiveUIDocument.Document;
            List&amp;lt;Element&amp;gt; _floors = new FilteredElementCollector(doc)
            .OfClass(typeof(Floor))
            .ToList();
            foreach (Element e in _floors)
            {
                Floor f = e as Floor;
                List&amp;lt;ElementId&amp;gt; _deleted = null;
                using (Transaction t = new Transaction(doc, "temp"))
                {
                    t.Start();
                    _deleted = doc.Delete(e.Id).ToList();
                    t.RollBack();
                }
                bool SketchLinesFound = false;
                List&amp;lt;ModelCurve&amp;gt; _sketchCurves = new List&amp;lt;ModelCurve&amp;gt;();
                foreach (var id in _deleted)
                {
                    // find modelcurves. these are the lines in the bounderysketch
                    ModelCurve mc = doc.GetElement(id) as ModelCurve;
                    if (mc != null)
                    {
                        _sketchCurves.Add(mc);
                        SketchLinesFound = true;
                    }
                    else
                    {
                        if (SketchLinesFound) break;
                    }
                }
                dict_SketchLines.Add(f, _sketchCurves);
            }
            foreach (Floor key in dict_SketchLines.Keys)
            {
                List&amp;lt;ModelCurve&amp;gt; _curves = dict_SketchLines[key];
                sb.AppendLine(string.Format("floor {0} has sketchlines:", key.Id));
                foreach (ModelCurve mc in _curves)
                {
                    sb.AppendLine(string.Format("    {0}  &amp;lt;{1}&amp;gt;", mc.GetType(), mc.Id));
                    sb.AppendLine(string.Format("       &amp;lt;{0}  --  {1}&amp;gt;", mc.GeometryCurve.GetEndPoint(0), mc.GeometryCurve.GetEndPoint(1)));
                }
                sb.AppendLine();
            }
            TaskDialog.Show("debug", sb.ToString());
&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Apr 2017 16:15:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7021129#M59311</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2017-04-17T16:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7022746#M59312</link>
      <description>&lt;P&gt;Thank you so much for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are able to get the floor's ID and the sketch lines' ID. We want to know how do we relate those IDs with the floor ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and we are grateful for your answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 08:31:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7022746#M59312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-18T08:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7022980#M59313</link>
      <description>&lt;P&gt;there isn't a fixed relation between the ElementId of the floor and ElementId of the SketchLine.&lt;/P&gt;
&lt;P&gt;If you need to find the floor from a SketchLine, then you'd have to fill your own Dictionary&amp;lt;Elementid&amp;nbsp; of SketchLine, ElementId of Floor&amp;gt; in the second&amp;nbsp;foreach -loop in my code.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 10:57:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7022980#M59313</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2017-04-18T10:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch lines with floors</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7032424#M59314</link>
      <description>&lt;P&gt;Thank you so much for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can already relate the ID of the floor's with the sketch lines' ID.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:10:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/sketch-lines-with-floors/m-p/7032424#M59314</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-21T09:10:44Z</dc:date>
    </item>
  </channel>
</rss>

