<?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: Create or modify a rendering asset? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/7546108#M66626</link>
    <description>&lt;P&gt;Please note - modification and creation of new appearance assets is now possible in the API as of Revit 2018.1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.autodesk.com/revit/2017/07/12/revit-2018-1-update-now-available/" target="_blank"&gt;http://blogs.autodesk.com/revit/2017/07/12/revit-2018-1-update-now-available/&lt;/A&gt; - see the section on Visual Materials API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consult the updated Revit 2018.1 SDK from&amp;nbsp;&lt;A href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;amp;id=2484975" target="_blank"&gt;http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;amp;id=2484975&lt;/A&gt; for a sample, updated documentation and code snippets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And consult Boris Shafiro's class from AU Las Vegas 2017 for even more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2017 13:56:08 GMT</pubDate>
    <dc:creator>conoves</dc:creator>
    <dc:date>2017-11-15T13:56:08Z</dc:date>
    <item>
      <title>Create or modify a rendering asset?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/6244577#M66622</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AppearanceAssetElement.Create takes a rendering asset as an input. Is there any way to create or modify this rendering asset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works to create a new material and new AppearanceAssetElement. But it relies on getting an existing asset with&lt;/P&gt;&lt;P&gt;app.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;get_Assets&lt;/SPAN&gt;(AssetType.Appearance).Cast&amp;lt;Asset&amp;gt;().&lt;SPAN style="color: #191970; font-weight: bold;"&gt;FirstOrDefault&lt;/SPAN&gt;()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible to modify this asset or create a new one? I want to be able to change the Description, Keywords, Color, and Finish.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Harry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;public&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #ff0000;"&gt;void&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #191970; font-weight: bold;"&gt;material&lt;/SPAN&gt;()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Application app =&amp;nbsp;&lt;SPAN style="font-weight: bold;"&gt;this&lt;/SPAN&gt;.Application;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UIApplication uiapp =&amp;nbsp;&lt;SPAN style="color: #008b8b; font-weight: bold;"&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #191970; font-weight: bold;"&gt;UIApplication&lt;/SPAN&gt;(app);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Document doc =&amp;nbsp;&lt;SPAN style="font-weight: bold;"&gt;this&lt;/SPAN&gt;.ActiveUIDocument.Document;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Asset a = app.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;get_Assets&lt;/SPAN&gt;(AssetType.Appearance).Cast&amp;lt;Asset&amp;gt;().&lt;SPAN style="color: #191970; font-weight: bold;"&gt;FirstOrDefault&lt;/SPAN&gt;();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;using&lt;/SPAN&gt;&amp;nbsp;(Transaction t =&amp;nbsp;&lt;SPAN style="color: #008b8b; font-weight: bold;"&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #191970; font-weight: bold;"&gt;Transaction&lt;/SPAN&gt;(doc,&lt;SPAN style="color: #0000ff;"&gt;"as"&lt;/SPAN&gt;))&lt;BR /&gt;&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;t.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;Start&lt;/SPAN&gt;();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppearanceAssetElement aa = AppearanceAssetElement.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;Create&lt;/SPAN&gt;(doc,&amp;nbsp;&lt;SPAN style="color: #0000ff;"&gt;"My new appearance asset"&lt;/SPAN&gt;,&amp;nbsp;a);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Material mat = doc.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;GetElement&lt;/SPAN&gt;(Material.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;Create&lt;/SPAN&gt;(doc,&amp;nbsp;&lt;SPAN style="color: #0000ff;"&gt;"My new material"&lt;/SPAN&gt;))&amp;nbsp;&lt;SPAN style="color: #008b8b; font-weight: bold;"&gt;as&lt;/SPAN&gt;&amp;nbsp;Material;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mat.AppearanceAssetId = aa.Id;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;Commit&lt;/SPAN&gt;();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 17:30:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/6244577#M66622</guid>
      <dc:creator>boostyourbim</dc:creator>
      <dc:date>2016-03-31T17:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create or modify a rendering asset?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/6327043#M66623</link>
      <description>Any solution Harry??? Looks like resounding silence.</description>
      <pubDate>Sun, 15 May 2016 12:08:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/6327043#M66623</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2016-05-15T12:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create or modify a rendering asset?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/6330159#M66624</link>
      <description>&lt;P&gt;Hi Harry, I am using:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;AppearanceAssetElement&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; aa = &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;AppearanceAssetElement&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.GetAppearanceAssetElementByName(doc, lstrAssetName);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;to return a specific Asset to use as a template for new duplicates&amp;nbsp;as per your code.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;From this sample I can return all the properties:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;A href="http://adndevblog.typepad.com/aec/2015/03/revitapi-how-to-get-asset-properties-of-material-i-want.html" target="_self"&gt;http://adndevblog.typepad.com/aec/2015/03/revitapi-how-to-get-asset-properties-of-material-i-want.html&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;but am at a loss as to how to set Appearance&amp;nbsp;Asset values (description for example). Using this link logic I have tried this to&amp;nbsp;no success:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (ap.Name == &lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"description"&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;prop.SetValue(ap, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"Test description"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;I would like to avoid any more time following down well-worn dead ends if there is no resolution.&amp;nbsp;Thanks.&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 12:54:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/6330159#M66624</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2016-05-17T12:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create or modify a rendering asset?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/7163657#M66625</link>
      <description>&lt;P&gt;Any suggestions to this? Is there still no chance to create an Asset object from the API?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 06:18:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/7163657#M66625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-20T06:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create or modify a rendering asset?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/7546108#M66626</link>
      <description>&lt;P&gt;Please note - modification and creation of new appearance assets is now possible in the API as of Revit 2018.1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.autodesk.com/revit/2017/07/12/revit-2018-1-update-now-available/" target="_blank"&gt;http://blogs.autodesk.com/revit/2017/07/12/revit-2018-1-update-now-available/&lt;/A&gt; - see the section on Visual Materials API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consult the updated Revit 2018.1 SDK from&amp;nbsp;&lt;A href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;amp;id=2484975" target="_blank"&gt;http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;amp;id=2484975&lt;/A&gt; for a sample, updated documentation and code snippets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And consult Boris Shafiro's class from AU Las Vegas 2017 for even more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 13:56:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-or-modify-a-rendering-asset/m-p/7546108#M66626</guid>
      <dc:creator>conoves</dc:creator>
      <dc:date>2017-11-15T13:56:08Z</dc:date>
    </item>
  </channel>
</rss>

