<?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 floor with void volume from family instance in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8309413#M47190</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I uploaded the VS project, the Revit project template and the family. What I want to do automatically with the Revit API I show you in the short video I also add. You can find my problem in line 266 in SimpleDialog.cs. If I want to intersect the floor with the spot, an exception is thrown. If you load the addin into your Revit environment enter a size bigger than 1500mm into the textboxes Currently I do not intercept wrong&amp;nbsp;input yet. Hope I added everything you need.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RevitToolSimpleDialog.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/553277iC90EE6B403A470DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="RevitToolSimpleDialog.jpg" alt="RevitToolSimpleDialog.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Oct 2018 09:25:28 GMT</pubDate>
    <dc:creator>anikakramer2006</dc:creator>
    <dc:date>2018-10-03T09:25:28Z</dc:date>
    <item>
      <title>Cutting floor with void volume from family instance</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8306454#M47188</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I know this question was asked last year and I tried the examples but still found no solution.&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2017/06/findinserts-determines-void-instances-cutting-a-floor.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2017/06/findinserts-determines-void-instances-cutting-a-floor.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://revitapisearch.com.s3-website-us-east-1.amazonaws.com/html/ca21c6c1-7689-1a1e-f370-219eba29b8ff.htm" target="_blank"&gt;http://revitapisearch.com.s3-website-us-east-1.amazonaws.com/html/ca21c6c1-7689-1a1e-f370-219eba29b8ff.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;with no luck.&lt;/P&gt;&lt;P&gt;As you can see in picture01 the parameter "Cut with Voids When Loaded" is yes. You can also see my void volume body inside the family.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture01.jpg" style="width: 872px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/552768i08C3330FE129C2E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="picture01.jpg" alt="picture01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Inside the project the family is hosted on a floor, or better said the Floor is the Work-Plane.&lt;/P&gt;&lt;P&gt;See picture02.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture02.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/552769i12B1A6D815B0B508/image-size/large?v=v2&amp;amp;px=999" role="button" title="picture02.jpg" alt="picture02.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I try:&lt;/P&gt;&lt;PRE&gt;FamilyInstance instance = _doc.Create.NewFamilyInstance(reference, location, new XYZ(0, 0, 0), symbol);
           
            Parameter parameter = instance.get_Parameter(BuiltInParameter.INSTANCE_FREE_HOST_OFFSET_PARAM);
            parameter.Set(-50 / 304.8);


            try
            {
                InstanceVoidCutUtils.AddInstanceVoidCut(_doc, floor, instance);
            }
            catch (Exception)
            {

                throw;
            }&lt;/PRE&gt;&lt;P&gt;I get this exception:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture03.jpg" style="width: 457px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/552772i25FB3B51BA348F06/image-size/large?v=v2&amp;amp;px=999" role="button" title="picture03.jpg" alt="picture03.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've just started with Revit Programming in C#. Maybe it is just one thing what I'm missing or doing wrong. Can somebody give me a little hint.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Annie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 07:41:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8306454#M47188</guid>
      <dc:creator>anikakramer2006</dc:creator>
      <dc:date>2018-10-02T07:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting floor with void volume from family instance</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8307641#M47189</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide more details about the question asked last year?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In order to explore this matter further, we will need to provide a minimal reproducible case for the development team to analyse in depth.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to understand exactly what you mean and be able to research possible reasons for the discrepancy between the observed and expected behaviour, they require:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;· A short exact description of what you are trying to achieve.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;· The behavior you observe versus what you expect, and why this is a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;· A complete yet minimal Revit sample model to run a test in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;· A complete yet minimal macro embedded in the sample model or Visual Studio solution with add-in manifest that can be compiled, loaded, run and debugged with a single click to analyse its behavior live in the sample model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;· Detailed step-by-step instructions for reproducing the issue, e.g. which element to pick, what command to launch etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;·&amp;nbsp;&lt;/SPAN&gt;&lt;A class="external-link" title="Follow link" href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank" rel="nofollow noopener noreferrer"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 15:31:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8307641#M47189</guid>
      <dc:creator>JimJia</dc:creator>
      <dc:date>2018-10-02T15:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting floor with void volume from family instance</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8309413#M47190</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I uploaded the VS project, the Revit project template and the family. What I want to do automatically with the Revit API I show you in the short video I also add. You can find my problem in line 266 in SimpleDialog.cs. If I want to intersect the floor with the spot, an exception is thrown. If you load the addin into your Revit environment enter a size bigger than 1500mm into the textboxes Currently I do not intercept wrong&amp;nbsp;input yet. Hope I added everything you need.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RevitToolSimpleDialog.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/553277iC90EE6B403A470DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="RevitToolSimpleDialog.jpg" alt="RevitToolSimpleDialog.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 09:25:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8309413#M47190</guid>
      <dc:creator>anikakramer2006</dc:creator>
      <dc:date>2018-10-03T09:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting floor with void volume from family instance</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8333626#M47191</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Please accept our sincerer apology for the delay! We had a backlog in the queue.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Per further investigation, we didn't find code problem, however the code can be refined to solve your problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In your code, you want cut elements immeditately after creating floor and family instance, the potential issue here is: the geometry of elements may not be regenerated successfully&amp;nbsp;yet, so the element cut will fail.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried to refine your code: &lt;STRONG&gt;firstly, create floor, familyinstance in one transaction firstly, and then cut elements in&amp;nbsp;another&amp;nbsp; separated&amp;nbsp;transaction, the code can work now, no exception will be threw, the cutting will happen successfully&lt;/STRONG&gt;; see code snippet example below(I also attached the updated .cs file), FYI:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;            // create family instance in one transaction firstl to ensure the create happens successfully.
            using (Transaction tr = new Transaction(_doc))
            {
                tr.Start("Create Steambath");
                CreateSteambathStandard();
                tr.Commit();
            }
            //
            // delay the cut after creation to ensure element geomtry build successfully.
            using (Transaction tr = new Transaction(_doc))
            {
                tr.Start("Cut element");
                CutElements();
                tr.Commit();
            }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 03:30:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8333626#M47191</guid>
      <dc:creator>JimJia</dc:creator>
      <dc:date>2018-10-15T03:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cutting floor with void volume from family instance</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8333726#M47192</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your response!&lt;/P&gt;&lt;P&gt;I have created a list with all family instances I want to cut with the floor&lt;/P&gt;&lt;P&gt;inside the transaction.&lt;/P&gt;&lt;P&gt;I gave it a quick try and jupp, total happy, it worked!&lt;/P&gt;&lt;P&gt;Good start into the new week.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 05:37:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cutting-floor-with-void-volume-from-family-instance/m-p/8333726#M47192</guid>
      <dc:creator>anikakramer2006</dc:creator>
      <dc:date>2018-10-15T05:37:24Z</dc:date>
    </item>
  </channel>
</rss>

