<?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: UpdateFromGlobal for Materials in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9145504#M124126</link>
    <description>&lt;P&gt;I believe you are looking for this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub Main()&lt;BR /&gt;If ThisDoc.Document.DocumentType = kPartDocumentObject Then&lt;BR /&gt;Dim objDocument As PartDocument&lt;BR /&gt;objDocument = ThisDoc.Document&lt;BR /&gt;objDocument.ComponentDefinition.Material.UpdateFromGlobal&lt;BR /&gt;ElseIf ThisApplication.ActiveDocument.DocumentType = kAssemblyDocumentObject Then&lt;BR /&gt;Dim objDocument As AssemblyDocument&lt;BR /&gt;objDocument = ThisDoc.Document&lt;BR /&gt;MessageBox.Show("objDocument.ComponentDefinition.Material.UpdateFromGlobal won't work", "Assemblies do not have Material", MessageBoxButtons.OK, MessageBoxIcon.Warning, _&lt;BR /&gt;MessageBoxDefaultButton.Button1)&lt;BR /&gt;End If&lt;BR /&gt;End Sub&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2019 04:10:24 GMT</pubDate>
    <dc:creator>VGonsalves</dc:creator>
    <dc:date>2019-11-14T04:10:24Z</dc:date>
    <item>
      <title>UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/5086980#M124118</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to update a material "style" from the global styles using UpdateFromGlobal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I have a part whose density has been changed locally. I would like to revert this back to the defaults in the Design Data. I have read a few posts where you can update a partslist style using this command. For example &lt;A href="https://forums.autodesk.com/t5/Inventor-Customization/ilogic-function-to-update-local-styles-to-match-Style-Library/td-p/3786051" target="_blank"&gt;http://forums.autodesk.com/t5/Inventor-Customization/ilogic-function-to-update-local-styles-to-match-Style-Library/td-p/3786051&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I tried replacing using the same idea and replacing the partslist with material but it doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone advise me on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2014 03:44:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/5086980#M124118</guid>
      <dc:creator>VGonsalves</dc:creator>
      <dc:date>2014-06-11T03:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/5102012#M124119</link>
      <description>Hi All&lt;BR /&gt;I have resolved this problem. Following is the code if anyone needs it&lt;BR /&gt;Dim objDocument As Document&lt;BR /&gt;objDocument = ThisDoc.Document&lt;BR /&gt;&lt;BR /&gt;objDocument.ComponentDefinition.Material.UpdateFromGlobal&lt;BR /&gt;&lt;BR /&gt;It maybe simple and obvious to most but I struggled to work this out</description>
      <pubDate>Wed, 18 Jun 2014 11:00:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/5102012#M124119</guid>
      <dc:creator>VGonsalves</dc:creator>
      <dc:date>2014-06-18T11:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/8786976#M124120</link>
      <description>&lt;P&gt;...I've been searching &amp;amp; struggling 3 hours before finding this one!&lt;/P&gt;
&lt;P&gt;Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 11:09:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/8786976#M124120</guid>
      <dc:creator>freesbee</dc:creator>
      <dc:date>2019-05-13T11:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9139402#M124121</link>
      <description>&lt;P&gt;When I try using VGonsalves code it doesn't work.&lt;/P&gt;&lt;P&gt;I'm not seeing Material available under Component Definition.&lt;/P&gt;&lt;P&gt;Could you post a complete working rule that uses this method.&lt;/P&gt;&lt;P&gt;I've been searching this topic for hours too, but most posts are for Drawing Documents and styles.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 14:48:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9139402#M124121</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-11-11T14:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9142875#M124122</link>
      <description>&lt;P&gt;I don't think this will help because the code is almost identical to the one posted earlier. Anyways here it is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub Main()&lt;BR /&gt;Dim objDocument As Document&lt;BR /&gt;objDocument = ThisDoc.Document&lt;/P&gt;&lt;P&gt;'Resets current material to match Style Library&lt;BR /&gt;objDocument.ComponentDefinition.Material.UpdateFromGlobal&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe there is some other error in your code. If you like you can share your code and someone on this forum should be able to help if I can't&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 01:45:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9142875#M124122</guid>
      <dc:creator>VGonsalves</dc:creator>
      <dc:date>2019-11-13T01:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9143886#M124123</link>
      <description>&lt;P&gt;I am using Inventor 2020 Pro from PC on Windows 7 Enterprise SP1 64-it.&lt;/P&gt;&lt;P&gt;I am trying to create an external iLogic rule that will work for both Parts &amp;amp; Assembly files, that will do something similar to:&amp;nbsp; Manage Tab/Styles and Standards section Update/[Yes to All]/[OK].&lt;/P&gt;&lt;P&gt;I realize that tool is doing a fairly complex set of updates.&lt;/P&gt;&lt;P&gt;I've tried almost every code I've found throughout the forums, and trial &amp;amp; error coding so far, so I'm trying to break it down into individual types.&amp;nbsp; In this case, just the materials.&lt;/P&gt;&lt;P&gt;The problem I'm having with trying to use your code is, when I have defined a "Document" type Object,&amp;nbsp; there isn't a "ComponentDefinition" Object available for it when coding.&lt;/P&gt;&lt;P&gt;The only way I can get a "ComponentDefinition" is by first defining either a "PartDocument" type or "AssemblyDocument" type document.&lt;/P&gt;&lt;P&gt;Then after I do get a "ComponentDefininition" of a "PartDocument" or "AssemblyDocument", I don't have the "Material" object available in the list after the point (or period)..&lt;/P&gt;&lt;P&gt;See images below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="ComponentDefinition of Document.png" style="width: 626px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/697484i2B79C4ADCF504C94/image-size/large?v=v2&amp;amp;px=999" role="button" title="ComponentDefinition of Document.png" alt="ComponentDefinition of Document.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="oCompDef list 1.png" style="width: 301px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/697486iFEE9A7996B0397B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="oCompDef list 1.png" alt="oCompDef list 1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="oCompDef list 2.png" style="width: 313px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/697485i8FF6BCFFD4509621/image-size/large?v=v2&amp;amp;px=999" role="button" title="oCompDef list 2.png" alt="oCompDef list 2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 13:12:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9143886#M124123</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-11-13T13:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9143954#M124124</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;dim objdocument as Partdocument&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;or&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;dim objdocument as Assemblydocument&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry you have been there already&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 13:54:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9143954#M124124</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2019-11-13T13:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9145312#M124125</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Sorry: it's a very bad time for me. AU Vegas is behind the corner, I shall fly tomorrow morning and I still didn't pack my suitcase (and here it's 01:00!!).&lt;/P&gt;&lt;P&gt;Please keep in mind the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;it's absolutely impossible for me now to dig down into your specific issue (in 2 weeks I will gladly do it)&lt;/LI&gt;&lt;LI&gt;I am absolutely ignorant in iLogic (I never needed, I never used it)&lt;/LI&gt;&lt;LI&gt;I implemented the code from VGonsalves first in VBA and then in VBnet, which definitely works because it has updated more or less 220.000 ipt files with it&lt;/LI&gt;&lt;LI&gt;I have only done it for IPTs because in my specific case it's 99% of the story (but could be equally done in IAMs)&lt;/LI&gt;&lt;LI&gt;I have used this code in a batch processor that does a huge number of updating, cleaning, making nice on multiple inventor files... so the "AlignMaterials" is only a small part of the whole project (you can see an image of the batch processor here)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="my inventor batch processor" style="width: 615px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/697655iE17362319BC1E164/image-size/large?v=v2&amp;amp;px=999" role="button" title="4ThisGuy.png" alt="my inventor batch processor" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;my inventor batch processor&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So assuming that the code (VB.Net):&lt;/P&gt;&lt;PRE&gt;oPartDoc.ComponentDefinition.Material.UpdateFromGlobal()&lt;/PRE&gt;&lt;P&gt;works fine, I am giving you now the small additional detail that I had to figure out myself to make the batch processor work fine.&lt;/P&gt;&lt;P&gt;As you probably understood this program controls inventor and makes it do a number of actions. One of such actions is to read one specific custom iProperty (one string) seek the active material library for a material that is named exactly as the custom iProperty and then:&lt;/P&gt;&lt;P&gt;A) if a material asset with the same name is present in the file update it from material library&lt;/P&gt;&lt;P&gt;B) if no material asset with the same name is present in the file, seek the material library, copy it locally and assign it to the part&lt;/P&gt;&lt;P&gt;Case A) is under examination here, and I can grant that the code from VGonsalves works.&lt;/P&gt;&lt;P&gt;Since this program is designed to process thousands of files, inventor is restarted every random number of files (in the image 467) in order to clear cache and similar stuff. I have soon realized that, after restarting inventor, the seeking for assets in the material library was ranomly failing, even if everything was setup correctly.&lt;/P&gt;&lt;P&gt;I figured out that the first time one part is opened after a clean start, to some strange reason the material library CAN be not loaded. I could fix the problem decreasing the counter by 1 when this condition is met, and processing the file again: then everything got working perfectly, and I could go through 220.000 files within one weekend (with 10 workstations).&lt;/P&gt;&lt;P&gt;Maybe something similar is causing you the issue as well?&lt;/P&gt;&lt;P&gt;If I totally misunderstood your question, please bear till Nov 25: then I'll be back and I will be able to support you directly on VBA level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 00:26:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9145312#M124125</guid>
      <dc:creator>freesbee</dc:creator>
      <dc:date>2019-11-14T00:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9145504#M124126</link>
      <description>&lt;P&gt;I believe you are looking for this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub Main()&lt;BR /&gt;If ThisDoc.Document.DocumentType = kPartDocumentObject Then&lt;BR /&gt;Dim objDocument As PartDocument&lt;BR /&gt;objDocument = ThisDoc.Document&lt;BR /&gt;objDocument.ComponentDefinition.Material.UpdateFromGlobal&lt;BR /&gt;ElseIf ThisApplication.ActiveDocument.DocumentType = kAssemblyDocumentObject Then&lt;BR /&gt;Dim objDocument As AssemblyDocument&lt;BR /&gt;objDocument = ThisDoc.Document&lt;BR /&gt;MessageBox.Show("objDocument.ComponentDefinition.Material.UpdateFromGlobal won't work", "Assemblies do not have Material", MessageBoxButtons.OK, MessageBoxIcon.Warning, _&lt;BR /&gt;MessageBoxDefaultButton.Button1)&lt;BR /&gt;End If&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 04:10:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9145504#M124126</guid>
      <dc:creator>VGonsalves</dc:creator>
      <dc:date>2019-11-14T04:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9147150#M124127</link>
      <description>&lt;P&gt;I tried that numerous times, but I still don't have the 'Material' option after the 'ComponentDefinition'.&lt;/P&gt;&lt;P&gt;I copied &amp;amp; ran your last two codes exactly, but neither is actually updating the material.&lt;/P&gt;&lt;P&gt;If these codes are working for you guys, but not for me, I have to wonder if there is some setting within my Inventor I don't have set the same as you do.&lt;/P&gt;&lt;P&gt;Within my 'Edit Rule' dialog box, on the Options Tab, Behavior of this ruls (section), I have the following options checked:&lt;/P&gt;&lt;P&gt;Supressed [unchecked], Silend operation [checked], Fire dependant rules immediately [checked], Don't run automatically [unchecked], Straight VB code [unchecked], Event triggers = All events enabled.&lt;/P&gt;&lt;P&gt;The iLogic Addin is set to automatically load (default) when the application loads.&lt;/P&gt;&lt;P&gt;I don't know what else to do to get this to work for me, the way it seems to be working for you guys.&lt;/P&gt;&lt;P&gt;I'm trying to run this as a normal external rule (like you write within the built-in Rule Editor), but is it possible that I may have to modify some settings within the VBA Editor, or activate more of its [Tools/References]?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:27:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9147150#M124127</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-11-14T17:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9147164#M124128</link>
      <description>&lt;P&gt;I also tried putting it into a new 'Module' of the ApplicationProject and running it as a macro, after making a few modifications for translating to the slightly different coding language.&amp;nbsp; But it didn't do anything.&amp;nbsp; No errors, just didn't do anything.&lt;/P&gt;&lt;P&gt;I have also been trying several other methods to do this too.&lt;/P&gt;&lt;P&gt;I've tried driving down through the 'For Each oAsset In oAssets...If...Then' loop method.&lt;/P&gt;&lt;P&gt;I've tried 'For Each oMaterialAsset In oMaterialAssets' loop method.&lt;/P&gt;&lt;P&gt;i've tried 'For Each oStyle In oStyles...If...Then' loop method.&lt;/P&gt;&lt;P&gt;Nothing is giving me the UpdateFromGlobal option within these objects.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:34:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9147164#M124128</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-11-14T17:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9148006#M124129</link>
      <description>&lt;P&gt;Can you please clarify what doesn't work for you. I have tried it as an external rule and the code as shown works fine. The other settings you mentioned seem fine too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use this code in a scenario as mentioned below&lt;/P&gt;&lt;P&gt;Through programming I alter the material colour and density for certain parts. If the part file is used for something else I alter the colour and density. So there are time when I need to revert back to the global style. This code helps me achieve it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure why you are experiencing problems. Maybe try resetting the material manually to confirm that it can be achieved manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In terms of Material not showing up in the pop-up, do not worry it doesn't show up for me either but I can assure you it is working code&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/698116i72A86C43854DEEF1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 02:20:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9148006#M124129</guid>
      <dc:creator>VGonsalves</dc:creator>
      <dc:date>2019-11-15T02:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9154843#M124130</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got that piece of code to work, after trying in on several different older part files. It is definately doing something, just not what I was hoping for.&amp;nbsp; This code only updates the single currently active material of the part file to match the active default material library's version of it.&amp;nbsp; I attached a couple of screen shots of the Update Styles dialog box before and after running this external rule on them.&amp;nbsp; I was hoping this would not just update the "Material", but also the currently active "Appearance".&amp;nbsp; Not every part uses the default appearance of the material. Sometimes the appearance is set to a different Appearance, that better represents our finished part.&lt;/P&gt;&lt;P&gt;But I suppose we've satisfied the title &amp;amp; purpose of this post at this point.&lt;/P&gt;&lt;P&gt;I will continue searching &amp;amp; experimenting on getting all the other things to update through iLogic code.&lt;/P&gt;&lt;P&gt;Along the way I figured out how to update all styles within a drawing file, and how to update all text styles in part files.&lt;/P&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Update Styles screen shot - before.png" style="width: 610px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699362i02DBF6EE1A74C09A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Update Styles screen shot - before.png" alt="Update Styles screen shot - before.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Update Styles screen shot - after.png" style="width: 610px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/699363iAB5A2EBCE9F2772C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Update Styles screen shot - after.png" alt="Update Styles screen shot - after.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:03:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9154843#M124130</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-11-19T13:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9155281#M124131</link>
      <description>&lt;P&gt;If your component is having an appearance override clearly this is another asset to update. To my memory I did some experiments and it works exactly the same for appearances. Of course you need to adjust the code to grab the current appearance override, that could be applied in several different ways (per body, per part, per face...).&lt;/P&gt;&lt;P&gt;Also keep in mind that so called "in document styles" are discouraged by Autodesk, as for example one material/appearance asset saved in the file and not in the Material Library. If you have them you should really consider if it makes more sense to invest your energies in updating them, or to clean them up (which was the reason why I came close to this technique)&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 15:34:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9155281#M124131</guid>
      <dc:creator>freesbee</dc:creator>
      <dc:date>2019-11-19T15:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9155501#M124132</link>
      <description>&lt;P&gt;I'm not using 'in document styles' in that sense.&amp;nbsp; I do sometimes switch the appearance of a part from the default material assigned one a similar one from within the 'Autodesk Appearance Library' to switch the appearance of a metal part from flat to polished, or a the shade of stain on a wood part, etc. No custom created materials or appearances that only exist in the one part file.&amp;nbsp; And as I stated before, I'm not just trying to update the one AciveMaterial or ActiveAppearance.&amp;nbsp; I am basically trying to duplicate the effects of manually clicking on Update Styles, having both Styles &amp;amp; Materials checked, clicking on 'Yes to All', then clicking on 'OK'.&lt;/P&gt;&lt;P&gt;I can simulate parts of these actions using the CommandManager, ControlDefinitions,&amp;nbsp; etc. objects, but still work to do.&lt;/P&gt;&lt;P&gt;But this isn't what this specific post is about, so I wasn't going to continue talking about it on this specific post, since it's purpose has already been met.&lt;/P&gt;&lt;P&gt;Thanks anyway.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 17:05:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9155501#M124132</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-11-19T17:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9177072#M124133</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Where can I found that batch file processor?&lt;/P&gt;&lt;P&gt;/Reine&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 13:27:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9177072#M124133</guid>
      <dc:creator>reine_den_andra</dc:creator>
      <dc:date>2019-12-02T13:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9226304#M124134</link>
      <description>&lt;P&gt;...well, that BatchProcessor is something that normally I give to my customers for free, since I do not have the capacity to develop it into a commercial product with all documentation that would follow (as you see it says "alpha" in the title bar&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt; ). I give it to them, but they do not use it &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;Normally they do not care of how I do it: they just want to see the result done, and once the result is achieved they are not interested in the program any more (logically: if you have already replaced border and titleblock on all your IDWs, you normally do not need to do that action again...). Clearly it also migrates files to the current version, which is another quite handy sub-product of it...&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jan 2020 10:04:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/9226304#M124134</guid>
      <dc:creator>freesbee</dc:creator>
      <dc:date>2020-01-01T10:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/12094817#M124135</link>
      <description>&lt;P&gt;I think I am having this same problem you had 4 years ago. Did you ever find a solution by any chance?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 20:28:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/12094817#M124135</guid>
      <dc:creator>ppolcynBNVFN</dc:creator>
      <dc:date>2023-07-11T20:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/12096653#M124136</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12723095"&gt;@ppolcynBNVFN&lt;/a&gt;.&amp;nbsp; Yes, several years ago.&amp;nbsp; I have learned a ton about iLogic, Inventor's API, and most of the common interactions with Inventor by code since then.&amp;nbsp; I also fully understand what was going on at that time now.&amp;nbsp; Back around 2016, Inventor changed from using the 'Material' &amp;amp; 'RenderStyle' objects, to using &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Asset" target="_blank" rel="noopener"&gt;Asset&lt;/A&gt; objects to represent things like materials, appearances, and physical properties.&amp;nbsp; I believe around that same time, the 'Material' property of the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-PartComponentDefinition" target="_blank" rel="noopener"&gt;PartComponentDefinition&lt;/A&gt; &amp;amp; &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-AssemblyComponentDefinition" target="_blank" rel="noopener"&gt;AssemblyComponentDefinition&lt;/A&gt; became a 'hidden' property (no longer visible to the user, and no longer shown in help documentation), and was only continuing to be supported to help maintain the functionality of 'legacy' solutions that were using it.&amp;nbsp; Also, there is a generic &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-ComponentDefinition" target="_blank" rel="noopener"&gt;ComponentDefinition&lt;/A&gt; object, that is not specific to any document type, then there are the more specific types, such as&amp;nbsp;PartComponentDefinition &amp;amp;&amp;nbsp;AssemblyComponentDefinition (and others), that are specific to a document type, and those more specific types are 'derived from' the generic type, and have more properties available to them than the generic type.&amp;nbsp; In that situation, the iLogic 'Intellisense' feature does not 'suggest' that some properties are available, due to the object being the generic version, but since the source document was really either a part or assembly, the properties are still supported even if they are not showing up in the Intellisense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are several ways to update Assets, but I have chosen to not use any 'hidden' properties in that process for several reasons, including because Autodesk warns us against doing so.&amp;nbsp; I have since developed several iLogic rules &amp;amp; VBA macros for this and similar tasks.&amp;nbsp; One of the solutions uses &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys.sendwait" target="_blank" rel="noopener"&gt;SendKeys.SendWait()&lt;/A&gt; to simulate interacting with the built-in user interface tool for updating materials &amp;amp; styles, and has worked very well for me for years now (VBA macro code &amp;amp; iLogic rule codes attached as text files).&amp;nbsp; But I do not recommend solutions involving the use of that SendKeys.SendWait method, due to the inherent dangers.&amp;nbsp; I have also attached another example iLogic rule (as a text file) for purging and updating model assets.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 13:30:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/12096653#M124136</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-07-12T13:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateFromGlobal for Materials</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/12483787#M124137</link>
      <description>&lt;P&gt;So the best solution and the one you're using and suggesting is the Purge and Update Model Assets script right?&lt;BR /&gt;Are there situations where the sendkey approach is better or the only way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 16:13:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updatefromglobal-for-materials/m-p/12483787#M124137</guid>
      <dc:creator>CattabianiI</dc:creator>
      <dc:date>2024-01-08T16:13:37Z</dc:date>
    </item>
  </channel>
</rss>

