<?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: How to link Excel VBA with parameterization to Inventor VBA? in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12024019#M44172</link>
    <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3253871"&gt;@ThyagoVicent&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1007817"&gt;@Crstiano&lt;/a&gt;&amp;nbsp;suggest using the built in parameter linking with excel is one route. It can be a little inflexible depending on where your data is stored, the units etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another method is using ilogic editor and ilogic API and go excel you can point&amp;nbsp; to a cell and import the data.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Parameter("d5") = GoExcel.CellValue("filename.xlsx", "SheetName", "Cell")
iLogicVb.UpdateWhenDone = True&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The hardest method is using inventor VBA. The reason being it uses Inventor API.&amp;nbsp; Open Excel and reference excel workbook and point to a cell and import parameters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting data from excel sample &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/import-export-with-vba-to-excel-spreadsheet/m-p/3873828#M43377" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ParameterSetValue_Sample" target="_blank" rel="noopener"&gt;Setting a parameter value from Inventor API Help here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can ask programming questions on the dedicated forum &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/bd-p/120" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 00:25:32 GMT</pubDate>
    <dc:creator>A.Acheson</dc:creator>
    <dc:date>2023-06-10T00:25:32Z</dc:date>
    <item>
      <title>How to link Excel VBA with parameterization to Inventor VBA?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12023235#M44170</link>
      <description>&lt;P&gt;Is it possible to link a parameterization made in Excel with Inventor's VBA?&lt;/P&gt;&lt;P&gt;I have performed parameterization of a machine in Inventor using Excel, in which when a measurement is changed in Excel, the machine adjusts its dimensions accordingly. However, I would like to implement this in VBA so that when Excel is opened, only the dimension fields that need to be changed are visible, and then the changes can be saved, the VBA closed, and the designer can open the Inventor file to see the changes in the project. Alternatively, if it is possible to incorporate this into Inventor's VBA, a VBA window could appear upon opening the project to modify the dimensions.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:48:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12023235#M44170</guid>
      <dc:creator>ThyagoVicent</dc:creator>
      <dc:date>2023-06-09T15:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to link Excel VBA with parameterization to Inventor VBA?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12023338#M44171</link>
      <description>&lt;P&gt;You can use the Parameters command to link with excel file.&lt;/P&gt;
&lt;P&gt;After just use the variables where you desire.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:27:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12023338#M44171</guid>
      <dc:creator>Crstiano</dc:creator>
      <dc:date>2023-06-09T16:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to link Excel VBA with parameterization to Inventor VBA?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12024019#M44172</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3253871"&gt;@ThyagoVicent&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1007817"&gt;@Crstiano&lt;/a&gt;&amp;nbsp;suggest using the built in parameter linking with excel is one route. It can be a little inflexible depending on where your data is stored, the units etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another method is using ilogic editor and ilogic API and go excel you can point&amp;nbsp; to a cell and import the data.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Parameter("d5") = GoExcel.CellValue("filename.xlsx", "SheetName", "Cell")
iLogicVb.UpdateWhenDone = True&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The hardest method is using inventor VBA. The reason being it uses Inventor API.&amp;nbsp; Open Excel and reference excel workbook and point to a cell and import parameters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting data from excel sample &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/import-export-with-vba-to-excel-spreadsheet/m-p/3873828#M43377" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ParameterSetValue_Sample" target="_blank" rel="noopener"&gt;Setting a parameter value from Inventor API Help here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can ask programming questions on the dedicated forum &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/bd-p/120" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 00:25:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12024019#M44172</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-06-10T00:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to link Excel VBA with parameterization to Inventor VBA?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12026403#M44173</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3253871"&gt;@ThyagoVicent&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think, you should use function available in Inventor.&lt;BR /&gt;Or you can use below VBA code, I'm really not good at VBA but I can only write what I know.&lt;BR /&gt;You can create a VBA that can run multiple .*ipt updates in .*iam.&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.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1226107i32DD89B502B85805/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub CreateParam()
    Dim oWkbk As Workbook
    Set oWkbk = ThisWorkbook
    Dim oSheet As Worksheet
    Set oSheet = oWkbk.ActiveSheet
    Dim oCell As Range
    oLastRow = oSheet.Cells(oSheet.Rows.Count, 1).End(XlDirection.xlUp).Row
    Dim oInv As Inventor.Application
    Set oInv = GetObject(, "Inventor.Application")
    Dim oDoc As Document
    Set oDoc = oInv.ActiveDocument
    Dim partDoc As PartDocument
    Set partDoc = oInv.ActiveDocument
    Dim userParams As UserParameters
    Set userParams = partDoc.ComponentDefinition.Parameters.UserParameters
    a = "A"
    i = 0
    For Each oCell In Range(a &amp;amp; i + 3, a &amp;amp; oLastRow)
        Dim param As Parameter
        On Error Resume Next
        Set param = userParams.AddByExpression(oCell, oCell.Offset(0, 1).Value, oCell.Offset(0, 2).Value)
        If Err.Number &amp;lt;&amp;gt; 0 Then
        On Error Resume Next
        End If
        Dim oUserParam As UserParameter
        For Each oUserParam In userParams
            Dim oLen As Variant
            oLen = Len(oUserParam.name)
            'If oLen &amp;lt;&amp;gt; 5 Then
                'oUserParam.Delete
            'End If
            If oUserParam.name = oCell.Value Then
                oUserParam.Comment = oCell.Offset(, 3)
            End If
        Next
    Next oCell
    MsgBox "Done!"
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub UpdateParam()
    Dim oWkbk As Workbook
    Set oWkbk = ThisWorkbook
    Dim oSheet As Worksheet
    Set oSheet = oWkbk.ActiveSheet
    Dim oCell As Range
    oLastRow = oSheet.Cells(oSheet.Rows.Count, 1).End(XlDirection.xlUp).Row
    Dim oInv As Inventor.Application
    Set oInv = GetObject(, "Inventor.Application")
    Dim oDoc As Document
    Set oDoc = oInv.ActiveDocument
    Dim partDoc As PartDocument
    Set partDoc = oInv.ActiveDocument
    a = "A"
    i = 0
    For Each oCell In Range(a &amp;amp; i + 3, a &amp;amp; oLastRow)
        Dim userParams As UserParameters
        Set userParams = partDoc.ComponentDefinition.Parameters.UserParameters
        Dim oUserParam As UserParameter
        For Each oUserParam In userParams
            If oUserParam.name = oCell.Value Then
            oUserParam.Expression = oCell.Offset(0, 1).Value
            End If
        Next
    Next
    MsgBox "Done!"
End Sub&lt;/LI-CODE&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="Capture2.JPG" style="width: 457px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1226108iE887E9E4F0AEA6B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 00:36:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-link-excel-vba-with-parameterization-to-inventor-vba/m-p/12026403#M44173</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2023-06-12T00:36:46Z</dc:date>
    </item>
  </channel>
</rss>

