<?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: Cutting Elements in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/6248192#M78000</link>
    <description>&lt;P&gt;Hello Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to cut an adaptive Familyinstance with a plane? I want to turn a uniform tubbing-ring into a taperring by attaching a plane on one end, and then rotating it into the tubbing-ring by a fixed angle. Then cutt off the material on the other side of the plane?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using a floor:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;FamilyInstance&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; fi = &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;AdaptiveComponentInstanceUtils&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.CreateAdaptiveComponentInstance(doc, symbol);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Floor &lt;FONT face="Consolas" size="2"&gt;floor = doc.Create.NewSlab(profile, level, line, 0.1, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;SolidSolidCutUtils&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.AddCutBetweenSolids(doc, fi, floor, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;Exception: "The element does not meet the condition that it must be solid and must be a GenericForm, GeomCombination, or a FamilyInstance.\r\nParameter name: solidToBeCut"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;What I don't understand is that the element for solidToBeCut, fi, is a FamilyInstance, so what is the problem?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dirk&lt;/P&gt;</description>
    <pubDate>Sat, 02 Apr 2016 20:24:00 GMT</pubDate>
    <dc:creator>dirk.neethling</dc:creator>
    <dc:date>2016-04-02T20:24:00Z</dc:date>
    <item>
      <title>Cutting Elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/4728179#M77997</link>
      <description>&lt;P&gt;I'm trying to write a tool that will cut a beam to to a reference plane and I'm not sure if it's possible in the API with SolidSolidCutUtils because of the element type that is a beam or reference plane. Here's my code so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TaskDialog.Show("Step 1", "Choose an element as a reference to cut to.");&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; Reference eRef = m_document.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element, "Please reference line.");&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; TaskDialog.Show("Step 2", "Choose an element to cut.");&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; Reference eCut = m_document.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element, "Please pick an element.");&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; if (eRef != null &amp;amp;&amp;amp; eRef.ElementId != ElementId.InvalidElementId &amp;amp;&amp;amp; eCut != null &amp;amp;&amp;amp; eCut.ElementId != ElementId.InvalidElementId)&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; {&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; CutElement(eRef, eCut, m_document, doc, activeDoc);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void CutElement(Reference eRef, Reference eCut, UIDocument m_document, Document doc, Document activeDoc)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //TaskDialog.Show("Step 2", "Here");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int CutElement = m_document.Document.GetElement(eCut).Id.IntegerValue;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int ReferenceLine = m_document.Document.GetElement(eRef).Id.IntegerValue;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Element solidToBeCut = activeDoc.GetElement(new ElementId(CutElement));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Element cuttingSolid = activeDoc.GetElement(new ElementId(ReferenceLine));&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Transaction transaction = new Transaction(activeDoc);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transaction.Start("AddCutBetweenSolids(activeDoc, solidToBeCut, cuttingSolid)");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SolidSolidCutUtils.AddCutBetweenSolids(activeDoc, solidToBeCut, cuttingSolid);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transaction.Commit();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is I get an error at AddCutBetweenSolids that the parameter solidToBeCut isn't of the right type. Is there another method that would accomplish what I'm trying to do or is there a way to fix this method to do what I want?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2014 22:25:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/4728179#M77997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-03T22:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting Elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/4732825#M77998</link>
      <description>&lt;P&gt;Dear Acm,&lt;BR /&gt;&lt;BR /&gt;Thank you for your query and nice clean sample code.&lt;BR /&gt;&lt;BR /&gt;There are several different possible ways to perform Boolean operations between Revit elements.&lt;BR /&gt;&lt;BR /&gt;I put together a collection of pointers to various discussions on The Building Coder for you:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.30" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.30&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The approach you are attempting using SolidSolidCutUtils within the family environment is one of the better and effective options in most cases.&lt;BR /&gt;&lt;BR /&gt;However, just as you have discovered, it has certain requirements on the input solids.&lt;BR /&gt;&lt;BR /&gt;Just as its name implies, the cutting solid must be a solid.&lt;BR /&gt;&lt;BR /&gt;A reference line definitely does not fulfil this requirement.&lt;BR /&gt;&lt;BR /&gt;You will have to create a solid somehow.&lt;BR /&gt;&lt;BR /&gt;Here is one suggestion of what you could do:&lt;BR /&gt;&lt;BR /&gt;Use the reference line you already have and another one perpendicular to it to define a plane, then define a large extruded cube on that plane, and subtract that from your main body.&lt;BR /&gt;&lt;BR /&gt;I also noted that you submitted an ADN case for this in parallel with this forum discussion thread.&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&lt;BR /&gt;&lt;BR /&gt;Please avoid submitting to ADN and the forum in parallel, or, if you insist, &lt;STRONG&gt;please, please, please&lt;/STRONG&gt; let us know about it to help us avoid having several people researching the same issue in separate threads or cases. Thank you!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 11:13:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/4732825#M77998</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-01-07T11:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting Elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/4733763#M77999</link>
      <description>&lt;P&gt;Dear Acm,&lt;BR /&gt;&lt;BR /&gt;Thank you again for your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I published the answer on The Building Coder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2014/01/sustainably-chugging-along.html#6" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2014/01/sustainably-chugging-along.html#6&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 16:50:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/4733763#M77999</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-01-07T16:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting Elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/6248192#M78000</link>
      <description>&lt;P&gt;Hello Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to cut an adaptive Familyinstance with a plane? I want to turn a uniform tubbing-ring into a taperring by attaching a plane on one end, and then rotating it into the tubbing-ring by a fixed angle. Then cutt off the material on the other side of the plane?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using a floor:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;FamilyInstance&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; fi = &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;AdaptiveComponentInstanceUtils&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.CreateAdaptiveComponentInstance(doc, symbol);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Floor &lt;FONT face="Consolas" size="2"&gt;floor = doc.Create.NewSlab(profile, level, line, 0.1, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;SolidSolidCutUtils&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.AddCutBetweenSolids(doc, fi, floor, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;Exception: "The element does not meet the condition that it must be solid and must be a GenericForm, GeomCombination, or a FamilyInstance.\r\nParameter name: solidToBeCut"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;What I don't understand is that the element for solidToBeCut, fi, is a FamilyInstance, so what is the problem?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dirk&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2016 20:24:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-elements/m-p/6248192#M78000</guid>
      <dc:creator>dirk.neethling</dc:creator>
      <dc:date>2016-04-02T20:24:00Z</dc:date>
    </item>
  </channel>
</rss>

