<?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: Creating Materials With Appearance asset in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333176#M46953</link>
    <description>&lt;P&gt;I saw the Post and even saw the AU Class, But They get existing materials with appearance assets and edit them, I create new materials that apparently doesn't have appearance asset to it (although it has a default generic appearance asset),&amp;nbsp;I cant access it or edit it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/557369i65325F85DD216C46/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;This is exactly what im getting. But the Color property from the graphics is not rendering as it has a default appearance asset that doesn't have an id?? or is not associated&amp;nbsp; with the material??&lt;/P&gt;</description>
    <pubDate>Sun, 14 Oct 2018 15:36:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-14T15:36:07Z</dc:date>
    <item>
      <title>Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8332858#M46951</link>
      <description>&lt;P&gt;I have a CSV File with RGB Values that im using to create materials in Revit through Dynamo Python scripting, However the materials that are created does not have AppearanceAsset assigned to it(even though it has a appearance asset tab}.Since when i get the AppearanceAssetID for the Material it Returns '-1' which as per the API means there is no assigned asset to it.&lt;/P&gt;&lt;P&gt;How do i create materials with Appearance IDs already assigned&lt;/P&gt;&lt;P&gt;I want to access the Appearance asset and set the Color to it, Since normally only the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;graphics&amp;nbsp;&lt;/STRONG&gt;color is set and not the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;appearance&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Color.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)


def ToRevitColor(dynamoColor):return Color(dynamoColor.Red, dynamoColor.Green, dynamoColor.Blue)
def ToDynamoObject(revitObject, isRevitOwned=False):return revitObject.ToDSType(isRevitOwned)
doc = DocumentManager.Instance.CurrentDBDocument

newMaterials = []
appassetid = []

TransactionManager.Instance.EnsureInTransaction(doc)

mat_name = IN[0]
color = IN[1]


for i,y in zip (mat_name, color):
    new_mat_id = Material.Create(doc, i)
    new_mat = doc.GetElement(new_mat_id)
    new_mat.Color = ToRevitColor(y)
    newMaterials.append(ToDynamoObject(new_mat))
    appassetid.append(new_mat.AppearanceAssetId)


TransactionManager.Instance.TransactionTaskDone()

OUT = newMaterials,appassetid&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="color 2.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/557294i7A3C81716972EDE4/image-size/large?v=v2&amp;amp;px=999" role="button" title="color 2.PNG" alt="color 2.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="color.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/557295iCB476BEE59D2C879/image-size/large?v=v2&amp;amp;px=999" role="button" title="color.PNG" alt="color.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output" style="width: 754px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/557293iD0F8B3B2E5AAB8D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="color3.PNG" alt="output" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;output&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.revitapidocs.com/2018.1/d02d0677-341a-8d1a-d3eb-35ff82f01695.htm" target="_blank"&gt;http://www.revitapidocs.com/2018.1/d02d0677-341a-8d1a-d3eb-35ff82f01695.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;API Reference&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2018 07:54:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8332858#M46951</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-14T07:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333011#M46952</link>
      <description>&lt;P&gt;Have you looked at the Appearance Asset Editing sample demonstrating the use of the Visual Materials API added to the Revit 2018.1 SDK?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2017/11/modifying-material-visual-appearance.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2017/11/modifying-material-visual-appearance.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;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2018 11:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333011#M46952</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-10-14T11:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333176#M46953</link>
      <description>&lt;P&gt;I saw the Post and even saw the AU Class, But They get existing materials with appearance assets and edit them, I create new materials that apparently doesn't have appearance asset to it (although it has a default generic appearance asset),&amp;nbsp;I cant access it or edit it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/557369i65325F85DD216C46/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;This is exactly what im getting. But the Color property from the graphics is not rendering as it has a default appearance asset that doesn't have an id?? or is not associated&amp;nbsp; with the material??&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2018 15:36:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333176#M46953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-14T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333721#M46954</link>
      <description>&lt;P&gt;Thank you for doing your research first!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this discussion help better then?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/changing-material-texture-path-with-editscope/m-p/8017578" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/changing-material-texture-path-with-editscope/m-p/8017578&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, maybe I should create a blog post from it...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&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;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 05:32:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333721#M46954</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-10-15T05:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333781#M46955</link>
      <description>&lt;P&gt;Almost , But they leave it unfinshed at the end , Il try creating a 'template material' and duplicating and creating new ones from it.I hope i can duplicate the appearance asset with it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also found this on the API docs , so il even try create new appearanceassets&amp;nbsp;and try to link it wtih the mateiral.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 707px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/557472i4B2E30DD7DB778C5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.revitapidocs.com/2018.1/f1daea30-3585-3332-adb1-dfe30d8a8180.htm" target="_blank"&gt;http://www.revitapidocs.com/2018.1/f1daea30-3585-3332-adb1-dfe30d8a8180.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:13:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333781#M46955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-15T06:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333785#M46956</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad to hear that it helps and you can move forward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I very much look forward to hearing how it goes for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you agree that this solution should make it onto The Building Coder blog as well, then, do you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&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;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:16:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333785#M46956</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-10-15T06:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333811#M46957</link>
      <description>&lt;P&gt;Yes, Definelty Since most of the posts regarding this are dead ends, you should post this solution&amp;nbsp; on the blog.&lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:53:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8333811#M46957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-15T06:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8346362#M46958</link>
      <description>&lt;P&gt;I Finally managed to do it.. It was&amp;nbsp; pretty Simple...All i had to do was duplicate a asset and apply&amp;nbsp; to all the materials created thru API&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 16:35:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8346362#M46958</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-19T16:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8579443#M46959</link>
      <description>&lt;P&gt;can you post it how you did it will be very helpful .one more question can we have material assets from one folder having image with name&amp;nbsp;to create&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 11:41:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8579443#M46959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-07T11:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8579593#M46960</link>
      <description>&lt;P&gt;I Wrote an article about it a few months ago, &amp;amp; recently the code has been added as nodes in 'Genus Loci' Package.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.linkedin.com/pulse/extracting-online-paint-color-catalog-create-material-kumar-igbc-ap" target="_blank"&gt;https://www.linkedin.com/pulse/extracting-online-paint-color-catalog-create-material-kumar-igbc-ap&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 12:34:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8579593#M46960</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-07T12:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8653157#M46961</link>
      <description>&lt;P&gt;So it sounds like you wouldn't be able to do this in a project with no materials.&amp;nbsp; You would need at least one material that has had its AppearanceAssetElement activated in order to duplicate it.&amp;nbsp; This seems like a huge oversight on Autodesk part.&amp;nbsp; Why can't a new material in API created with&amp;nbsp;AppearanceAssetElement without duplicating an existing asset??&amp;nbsp; This seems very silly if I'm understanding this correctly.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 16:30:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/8653157#M46961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-12T16:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/10624092#M46962</link>
      <description>&lt;P&gt;i have installed&amp;nbsp; revit working properly but merial family is empty only showing catagory options how can i fix it&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 12:40:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/10624092#M46962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-15T12:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Materials With Appearance asset</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/10624248#M46963</link>
      <description>&lt;P&gt;I do not know what the 'merial family' might be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you doing anything yourself programmatically with the Revit API?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, please be aware that this is not the best place to ask your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note that this discussion forum is dedicated to programming Revit using the Revit API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are not doing anything programmatically yourself using the Revit API, I am afraid this is not the best place to ask such a question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot expect an answer to a question relating to system requirements, installation, product setup, optimisation, usage or other end user support issues here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should try one of the non-API Revit product support discussion forums instead for that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/this-forum-is-for-revit-api-programming-questions-not-for/td-p/5607765" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/this-forum-is-for-revit-api-programming-questions-not-for/td-p/5607765&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The people there are much better equipped to address this topic than us programming nerds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 13:32:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-materials-with-appearance-asset/m-p/10624248#M46963</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-09-15T13:32:42Z</dc:date>
    </item>
  </channel>
</rss>

