<?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: Change Design Option in Revit API in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6662875#M62109</link>
    <description>&lt;P&gt;Hi Wilson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I am not able to set one design option as a primary design option because the property &lt;STRONG&gt;IsPrimary&lt;/STRONG&gt; which was readonly. Is there any some other ways available to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vinoth Kumar.R&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2016 16:17:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-11-02T16:17:55Z</dc:date>
    <item>
      <title>Change Design Option in Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6662720#M62107</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to change the design option dynamically through API. Kindly help me to accomplish this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vinoth Kumar.R&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 15:36:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6662720#M62107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-02T15:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change Design Option in Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6662841#M62108</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/revit-api-forum/expose-design-options-settings/m-p/6450298/highlight/true#M17473" target="_blank"&gt;http://forums.autodesk.com/t5/revit-api-forum/expose-design-options-settings/m-p/6450298/highlight/true#M17473&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 16:06:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6662841#M62108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-02T16:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Change Design Option in Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6662875#M62109</link>
      <description>&lt;P&gt;Hi Wilson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I am not able to set one design option as a primary design option because the property &lt;STRONG&gt;IsPrimary&lt;/STRONG&gt; which was readonly. Is there any some other ways available to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vinoth Kumar.R&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 16:17:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6662875#M62109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-02T16:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Change Design Option in Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6669888#M62110</link>
      <description>He pointed you to a link that states that this functionality is NOT exposed in Revit API. That's your answer right there.</description>
      <pubDate>Sun, 06 Nov 2016 03:06:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/6669888#M62110</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-06T03:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change Design Option in Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/8349910#M62111</link>
      <description>&lt;P&gt;Here is a Q &amp;amp; A on this from the&amp;nbsp;Revit API Panel @ AU Las Vegas 2017:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2017/11/revit-api-panel-au-las-vegas-2017.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2017/11/revit-api-panel-au-las-vegas-2017.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q: Have a requirement to accept design options on the project.&lt;/P&gt;
&lt;P&gt;A: Not exposed on the API, but just accept design option is easier, but needs to be on Revit Ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check for a wish list item for&amp;nbsp;the desired functionality&amp;nbsp;in the Revit Idea Station and vote for it, if found; submit a new one, if not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here&amp;nbsp;is a very tricky workaround suggestion, if you are willing to hack:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2015/03/list-and-switch-design-options-using-ui-automation.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2015/03/list-and-switch-design-options-using-ui-automation.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 11:38:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/8349910#M62111</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-10-22T11:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change Design Option in Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/9767083#M62112</link>
      <description>&lt;P&gt;What about opening the model twice, in the first model we delete all design options sets and then, from the second model we copy all design option geometrical elements to the first model? Would that be equivalent to accepting the design options?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;//PROVIDE A MODEL PATH
String path="c:\\myRevitModel.rvt"

//Open your model a first time
Document doc = commandData.Application.OpenAndActivateDocument(path).Document;

//OPEN THE MODEL TEMPORARILY FOR A SECOND TIME
Document doc_temp = commandData.Application.OpenAndActivateDocument(path).Document;

//FIND ALL GEOMETRICAL ELEMENTS FROM THE PRIMARY DESIGN OPTIONS IN THE TEMPORARY MODEL
FilteredElementCollector finalCollectorTemp = new FilteredElementCollector(doc_temp);
PrimaryDesignOptionMemberFilter filterTemp = new PrimaryDesignOptionMemberFilter(false);
finalCollectorTemp.WherePasses(filterTemp);
finalCollectorTemp.WhereElementIsNotElementType();
finalCollectorTemp.WhereElementIsViewIndependent();
List&amp;lt;ElementId&amp;gt; TempElementsIDsList = new List&amp;lt;ElementId&amp;gt;();
foreach (Element i in finalCollectorTemp)
{
    if ((null != i.Category) &amp;amp;&amp;amp; (null != i.get_Geometry(new Options())))
    {
        TempElementsIDsList.Add(i.Id);
    }
}

//SELECTING ALL DESIGN OPTION SETS AND DESIGN OPTIONS
finalCollector = new FilteredElementCollector(doc);
finalCollector.OfCategory(BuiltInCategory.OST_DesignOptions);
finalCollector.UnionWith((new FilteredElementCollector(doc)).OfCategory(BuiltInCategory.OST_DesignOptionSets));
ICollection&amp;lt;ElementId&amp;gt; ElementIDs = finalCollector.ToElementIds();

//DELETING ALL DESIGN OPTION SETS AND DESIGN OPTIONS
using (Transaction tx = new Transaction(doc))
{
    tx.Start("Deleting all design options sets and all design options");
    XYZ translation = new XYZ();
    doc.Delete(ElementIDs);
    tx.Commit();
}

//COPYING THE DESIGN OPTION ELEMENTS TO THE MODEL
ICollection&amp;lt;ElementId&amp;gt; CopiedElementsIDs = null;
using (Transaction tx = new Transaction(doc))
{
  tx.Start("Copying Elements from Temporary Model to Main Model");
  CopyPasteOptions copy_paste_options = new CopyPasteOptions();
  XYZ translation = new XYZ();
  Transform transform = Transform.Identity;
  CopiedElementsIDs = Autodesk.Revit.DB.ElementTransformUtils.CopyElements(
    doc_temp,TempElementsIDsList,doc, transform, copy_paste_options);
  tx.Commit();
}

//CLOSE THE TEMPORARY MODEL
doc_temp.Close(false);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 22:24:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/9767083#M62112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-24T22:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change Design Option in Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/10103496#M62113</link>
      <description>&lt;P&gt;@Anonymous,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For those who are interested about Design Options, since Accepting Design Options is not yet possible by the Revit API, I am sharing a workaround which is deleting all non-Primary Design Options. I hope this is useful for others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;public void DeletingAllNonPrimaryDesignOptions(Document doc)
{
	//Selecting All Design Options
	FilteredElementCollector collector = new FilteredElementCollector(doc);
	collector.OfCategory(BuiltInCategory.OST_DesignOptions);

	//Selecting All non-Primary Design Options
	List&amp;lt;ElementId&amp;gt; DesignOptionsNotPrimaryIDs = new List&amp;lt;ElementId&amp;gt;();
	foreach (Element i in collector)
	{
		Autodesk.Revit.DB.DesignOption ii = i as Autodesk.Revit.DB.DesignOption;
		if (ii != null)
		{
			if (ii.IsPrimary != true)
			DesignOptionsNotPrimaryIDs.Add(ii.Id);
		}
	}

	//Deleting All non-Primary Design Options
	using (Transaction tx = new Transaction(doc))
	{
		tx.Start("Deleting all non-primary design options")
		doc.Delete(DesignOptionsNotPrimaryIDs);
		tx.Commit();
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 00:22:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/change-design-option-in-revit-api/m-p/10103496#M62113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-23T00:22:05Z</dc:date>
    </item>
  </channel>
</rss>

