<?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 API To Get Material Type in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-to-get-material-type/m-p/7653808#M16963</link>
    <description>&lt;P&gt;Can anybody help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anybody know how to display (in a message box for testing only) the Fusion 360 part material?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Say I have a part and I assign Stainless Steel to that part, I need to be able to display the material in a message box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just a small part of a larger project that I an working on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Darren&lt;/P&gt;</description>
    <pubDate>Fri, 29 Dec 2017 09:38:25 GMT</pubDate>
    <dc:creator>isocam</dc:creator>
    <dc:date>2017-12-29T09:38:25Z</dc:date>
    <item>
      <title>API To Get Material Type</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-to-get-material-type/m-p/7653808#M16963</link>
      <description>&lt;P&gt;Can anybody help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anybody know how to display (in a message box for testing only) the Fusion 360 part material?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Say I have a part and I assign Stainless Steel to that part, I need to be able to display the material in a message box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just a small part of a larger project that I an working on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Darren&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 09:38:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-to-get-material-type/m-p/7653808#M16963</guid>
      <dc:creator>isocam</dc:creator>
      <dc:date>2017-12-29T09:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: API To Get Material Type</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-to-get-material-type/m-p/7657423#M16964</link>
      <description>&lt;P&gt;I am not entirely sure what you want, but if it is the name of the material applied to a component its usually the same as the appearance name which can be found using the following code&lt;/P&gt;&lt;PRE&gt;appearanceName = occurrence.appearance.name&lt;/PRE&gt;&lt;P&gt;and displayed using the following code&lt;/P&gt;&lt;PRE&gt;app = adsk.core.Application.get()
ui  = app.userInterface
ui.messageBox(appearanceName)&lt;/PRE&gt;&lt;P&gt;Please reply if this is what you want or something else is desired? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Erik&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2018 20:28:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-to-get-material-type/m-p/7657423#M16964</guid>
      <dc:creator>erik</dc:creator>
      <dc:date>2018-01-01T20:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: API To Get Material Type</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-to-get-material-type/m-p/7658958#M16965</link>
      <description>&lt;P&gt;Given a component in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ptr&amp;lt;Component&amp;gt; comp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can access the material properties using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ptr&amp;lt;Material&amp;gt; mat = comp-&amp;gt;material();&lt;/P&gt;&lt;P&gt;string matname = mat-&amp;gt;name();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 17:20:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-to-get-material-type/m-p/7658958#M16965</guid>
      <dc:creator>wegienka</dc:creator>
      <dc:date>2018-01-02T17:20:49Z</dc:date>
    </item>
  </channel>
</rss>

