<?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: iLogic to Update Subassembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-update-subassembly/m-p/9067053#M101882</link>
    <description>&lt;P&gt;I solved my own problem. The issue was that I was calling out the inventor partfile. Working code below. This is intended to update all parameters in all files as long as they match.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Public&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()
	&lt;SPAN&gt;CopyUserParams&lt;/SPAN&gt;()
	&lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;UpdateWhenDone&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Private&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;CopyUserParams&lt;/SPAN&gt;()
    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
        &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"The active document must be an assembly."&lt;/SPAN&gt;)
        &lt;SPAN&gt;Return&lt;/SPAN&gt;
    &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;	
    &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;refDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
                 &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;partDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;refDoc&lt;/SPAN&gt;
            &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;refDocUserParams&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameters&lt;/SPAN&gt; = &lt;SPAN&gt;partDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;

            &lt;SPAN&gt;' Add the assembly parameters to everything.&lt;/SPAN&gt;
            &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;asmUserParam&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameter&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;
                &lt;SPAN&gt;' Check to see if the parameter already exists.&lt;/SPAN&gt;
                &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;checkParam&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameter&lt;/SPAN&gt; = &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
                &lt;SPAN&gt;Try&lt;/SPAN&gt;
                    &lt;SPAN&gt;checkParam&lt;/SPAN&gt; = &lt;SPAN&gt;refDocUserParams&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;asmUserParam&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)
                &lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
                    &lt;SPAN&gt;checkParam&lt;/SPAN&gt; = &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
                &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
				&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;checkParam&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;'do nothing&lt;/SPAN&gt;
					&lt;SPAN&gt;Else&lt;/SPAN&gt;					
                  &lt;SPAN&gt;' Update the value of the existing parameter.&lt;/SPAN&gt;
                    &lt;SPAN&gt;checkParam&lt;/SPAN&gt;.&lt;SPAN&gt;Expression&lt;/SPAN&gt; = &lt;SPAN&gt;asmUserParam&lt;/SPAN&gt;.&lt;SPAN&gt;Expression&lt;/SPAN&gt;
				&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
                &lt;SPAN&gt;Next&lt;/SPAN&gt;
    &lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;'Original Code Copied from https://forums.autodesk.com/t5/inventor-customization/ilogic-push-all-assembly-user-parameters-to-parts/m-p/7961847#M83748&lt;/SPAN&gt;
&lt;SPAN&gt;'Modified to not add a missing parameter and to update subassemblies instead of just parts&lt;/SPAN&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Oct 2019 12:23:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-10-04T12:23:39Z</dc:date>
    <item>
      <title>iLogic to Update Subassembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-update-subassembly/m-p/9065860#M101855</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I have a need to update all of the parameters in all of my sub assemblies as long as they have matching names. (For example, if the main assembly has a user parameter called "parameter1" any sub assemblies or parts that also have a user parameter called parameter1 should be updated) These sub assemblies may change, but I still want to have everything updated . I can update all my parts with the code below, but my assembly section of my code doesn't function as I am expecting. I feel like it should be updating based on my current knowledge, but I will admit that I am not iLogic Fluent. I have highlighted the area that isn't working. I feel like I should be able to get it to work with only one if loop, but I've gotten stuck.&lt;BR /&gt;TIA for any assistance.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Public Sub Main()&lt;BR /&gt;CopyUserParams()&lt;BR /&gt;iLogicVb.UpdateWhenDone = True&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub CopyUserParams()&lt;BR /&gt;If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; Inventor.DocumentTypeEnum.kAssemblyDocumentObject Then&lt;BR /&gt;MsgBox("The active document must be an assembly.")&lt;BR /&gt;Return&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;Dim asmDoc As Inventor.AssemblyDocument = ThisDoc.Document&lt;BR /&gt;For Each refDoc As Inventor.Document In asmDoc.AllReferencedDocuments&lt;BR /&gt;' Look for part documents.&lt;BR /&gt;If refDoc.DocumentType = Inventor.DocumentTypeEnum.kPartDocumentObject Then&lt;BR /&gt;Dim partDoc As Inventor.PartDocument = refDoc&lt;BR /&gt;Dim refDocUserParams As UserParameters = partDoc.ComponentDefinition.Parameters.UserParameters&lt;/P&gt;&lt;P&gt;' Add the assembly parameters to the part.&lt;BR /&gt;For Each asmUserParam As UserParameter In asmDoc.ComponentDefinition.Parameters.UserParameters&lt;BR /&gt;' Check to see if the parameter already exists.&lt;BR /&gt;Dim checkParam As UserParameter = Nothing&lt;BR /&gt;Try&lt;BR /&gt;checkParam = refDocUserParams.Item(asmUserParam.Name)&lt;BR /&gt;Catch ex As Exception&lt;BR /&gt;checkParam = Nothing&lt;BR /&gt;End Try&lt;BR /&gt;If checkParam Is Nothing Then 'do nothing&lt;BR /&gt;Else&lt;BR /&gt;' Update the value of the existing parameter.&lt;BR /&gt;checkParam.Expression = asmUserParam.Expression&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Else If refDoc.DocumentType = Inventor.DocumentTypeEnum.kAssemblyDocumentObject Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Dim partdoc As Inventor.AssemblyDocument = refDoc&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Dim refDocUserParams As UserParameters = asmDoc.ComponentDefinition.Parameters.UserParameters&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;' Add the top level parameters to the assembly.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;For Each asmUserParam As UserParameter In asmDoc.ComponentDefinition.Parameters.UserParameters&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;' Check to see if the parameter already exists.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Dim checkParam As UserParameter = Nothing&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Try&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;checkParam = refdocuserparams.Item(asmUserParam.Name)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Catch ex As Exception&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;checkParam = Nothing&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;End Try&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;If checkParam Is Nothing Then 'do nothing&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Else &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;' Update the value of the existing parameter.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;checkParam.Expression = asmUserParam.Expression&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Next&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;End If&lt;/FONT&gt;&lt;BR /&gt;Next&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 20:38:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-update-subassembly/m-p/9065860#M101855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-03T20:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Update Subassembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-update-subassembly/m-p/9067053#M101882</link>
      <description>&lt;P&gt;I solved my own problem. The issue was that I was calling out the inventor partfile. Working code below. This is intended to update all parameters in all files as long as they match.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Public&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()
	&lt;SPAN&gt;CopyUserParams&lt;/SPAN&gt;()
	&lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;UpdateWhenDone&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Private&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;CopyUserParams&lt;/SPAN&gt;()
    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
        &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"The active document must be an assembly."&lt;/SPAN&gt;)
        &lt;SPAN&gt;Return&lt;/SPAN&gt;
    &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;	
    &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;refDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
                 &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;partDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;refDoc&lt;/SPAN&gt;
            &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;refDocUserParams&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameters&lt;/SPAN&gt; = &lt;SPAN&gt;partDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;

            &lt;SPAN&gt;' Add the assembly parameters to everything.&lt;/SPAN&gt;
            &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;asmUserParam&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameter&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;
                &lt;SPAN&gt;' Check to see if the parameter already exists.&lt;/SPAN&gt;
                &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;checkParam&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameter&lt;/SPAN&gt; = &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
                &lt;SPAN&gt;Try&lt;/SPAN&gt;
                    &lt;SPAN&gt;checkParam&lt;/SPAN&gt; = &lt;SPAN&gt;refDocUserParams&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;asmUserParam&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)
                &lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
                    &lt;SPAN&gt;checkParam&lt;/SPAN&gt; = &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
                &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
				&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;checkParam&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;'do nothing&lt;/SPAN&gt;
					&lt;SPAN&gt;Else&lt;/SPAN&gt;					
                  &lt;SPAN&gt;' Update the value of the existing parameter.&lt;/SPAN&gt;
                    &lt;SPAN&gt;checkParam&lt;/SPAN&gt;.&lt;SPAN&gt;Expression&lt;/SPAN&gt; = &lt;SPAN&gt;asmUserParam&lt;/SPAN&gt;.&lt;SPAN&gt;Expression&lt;/SPAN&gt;
				&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
                &lt;SPAN&gt;Next&lt;/SPAN&gt;
    &lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;'Original Code Copied from https://forums.autodesk.com/t5/inventor-customization/ilogic-push-all-assembly-user-parameters-to-parts/m-p/7961847#M83748&lt;/SPAN&gt;
&lt;SPAN&gt;'Modified to not add a missing parameter and to update subassemblies instead of just parts&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Oct 2019 12:23:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-update-subassembly/m-p/9067053#M101882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-04T12:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Update Subassembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-update-subassembly/m-p/11991745#M153162</link>
      <description>&lt;P&gt;I was looking for a variety of solutions to this same thing and many resulted in faults and other problems. Then I recalled one of my co-workers doing something similar and he had a very simple bit of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'Define the open document
Dim openDoc As Document
openDoc = ThisDoc.Document

'Look at all of the files referenced in the open document
Dim docFile As Document
For Each docFile In openDoc.AllReferencedDocuments                
'format  file name                   
Dim FNamePos As Long
FNamePos = InStrRev(docFile.FullFileName, "\", -1)                        
Dim docFName As String 
docFName = Right(docFile.FullFileName, Len(docFile.FullFileName) - FNamePos) 
Parameter.Quiet = True
Parameter(docFName, "Parameter1") = Parameter1
Parameter(docFName, "Parameter2") = Parameter2
Parameter(docFName, "Parameter3") = Parameter3
Next

iLogicVb.UpdateWhenDone=True
InventorVb.DocumentUpdate()
ThisApplication.ActiveView.Fit&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This will run just the listed parameters and it will go into each part. There were problems 10 years ago that didn't always push the parameters into some of the subpart and assemblies, but I have not run into that recently. If that is an issue we simply put the code in some of the subassemblies.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 15:49:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-update-subassembly/m-p/11991745#M153162</guid>
      <dc:creator>trevorauman</dc:creator>
      <dc:date>2023-05-26T15:49:55Z</dc:date>
    </item>
  </channel>
</rss>

