<?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: How to create temporary element? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/11753049#M37061</link>
    <description>&lt;P&gt;Look into TransactionGroups, any transaction that you start and commit within a TransactionGroup, can be rolled back via TransactionGroup.RollBack.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1: Start a TransactionGroup&lt;/P&gt;&lt;P&gt;2: Start regular Transaction&lt;/P&gt;&lt;P&gt;3: Create your element&lt;BR /&gt;4: Commit regular Transaction&lt;/P&gt;&lt;P&gt;5: Start another regular Transaction&lt;/P&gt;&lt;P&gt;6: Change parameters&lt;/P&gt;&lt;P&gt;7: Commit regular Transaction&lt;/P&gt;&lt;P&gt;8: Get BoundingBox of your element&lt;/P&gt;&lt;P&gt;9: Rollback the TransactionGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 08:58:12 GMT</pubDate>
    <dc:creator>LTusche1</dc:creator>
    <dc:date>2023-02-14T08:58:12Z</dc:date>
    <item>
      <title>How to create temporary element?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9276070#M37056</link>
      <description>&lt;P&gt;I am trying to get the bounding box of a familyinstance that is created inside a transcation and use it to adjust its parameter in a single transaction. Here is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using (Transaction t = new Transaction(doc, "Create Multiple"))
            {
                t.Start();
                foreach (View view in views)
                {
                    FamilyInstance fi = doc.Create.NewFamilyInstance(point, symbol, view);
                    BoundingBoxXYZ b = fi.get_BoundingBox(doc.ActiveView);
                    fi.LookupParameter(param).Set(b.Max.X.ToString());
                }
                t.Commit();
            }&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Jan 2020 07:13:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9276070#M37056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T07:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create temporary element?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9276188#M37057</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;you can't set the value of instance parameter before creating the family instance in the project.&lt;/P&gt;
&lt;P&gt;Instance parameters are accessible only after creating a family instance inside the project.&lt;/P&gt;
&lt;P&gt;Your family instance is created only after the transaction gets completed.&lt;/P&gt;
&lt;P&gt;To set the value for a parameter, create one more transaction and set the value.&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;</description>
      <pubDate>Mon, 27 Jan 2020 08:41:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9276188#M37057</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2020-01-27T08:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create temporary element?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9276210#M37058</link>
      <description>&lt;P&gt;How do I create another transaction inside a loop and assimilate it in a single transaction to make it undoable once.&amp;nbsp; I am still new in creating subtransactions.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 08:48:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9276210#M37058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T08:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create temporary element?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9284821#M37059</link>
      <description>&lt;P&gt;Got it to work. I thought that the error was in my Subtransaction.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 08:55:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9284821#M37059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-30T08:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create temporary element?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9472674#M37060</link>
      <description>&lt;P&gt;@AnonymousI'm having the same question. Can you share your solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 08:31:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/9472674#M37060</guid>
      <dc:creator>ottosson_mathias</dc:creator>
      <dc:date>2020-04-27T08:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create temporary element?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/11753049#M37061</link>
      <description>&lt;P&gt;Look into TransactionGroups, any transaction that you start and commit within a TransactionGroup, can be rolled back via TransactionGroup.RollBack.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1: Start a TransactionGroup&lt;/P&gt;&lt;P&gt;2: Start regular Transaction&lt;/P&gt;&lt;P&gt;3: Create your element&lt;BR /&gt;4: Commit regular Transaction&lt;/P&gt;&lt;P&gt;5: Start another regular Transaction&lt;/P&gt;&lt;P&gt;6: Change parameters&lt;/P&gt;&lt;P&gt;7: Commit regular Transaction&lt;/P&gt;&lt;P&gt;8: Get BoundingBox of your element&lt;/P&gt;&lt;P&gt;9: Rollback the TransactionGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 08:58:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-temporary-element/m-p/11753049#M37061</guid>
      <dc:creator>LTusche1</dc:creator>
      <dc:date>2023-02-14T08:58:12Z</dc:date>
    </item>
  </channel>
</rss>

