<?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: Create Parameters in Assembly with iLogic Rule in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/create-parameters-in-assembly-with-ilogic-rule/m-p/6907791#M290998</link>
    <description>&lt;P&gt;Thanks for the great help.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 00:29:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-28T00:29:07Z</dc:date>
    <item>
      <title>Create Parameters in Assembly with iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/create-parameters-in-assembly-with-ilogic-rule/m-p/6878071#M290996</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one iLogic Rule which goes through every part in an assembly, extracts info, creates dxfs and exports BOMs along with other tasks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am missing one element. I need to be able to create parameters in the subparts. I am able to create iProperties, but have not found anywhere how to create a new parameter in a subpart of the assembly in which the rule is running. Right now if those parameters are missing, I am using a Try - Catch to skip over tasks that would fail if they weren't present.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 21:31:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/create-parameters-in-assembly-with-ilogic-rule/m-p/6878071#M290996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T21:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create Parameters in Assembly with iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/create-parameters-in-assembly-with-ilogic-rule/m-p/6878233#M290997</link>
      <description>&lt;P&gt;Hi heather5UNX9,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this should work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:&lt;BR /&gt;&lt;A href="http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120" target="_blank"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main 

	Dim oValue As Double 
	dValue = 15 'value to push to each component

    Dim asmDoc As AssemblyDocument 
    asmDoc = ThisApplication.ActiveDocument 
    
    ' Iterate through all of the referenced documents
    Dim doc As Document 
    For Each doc In asmDoc.AllReferencedDocuments 
        'update the components 
        Call UpdateParameter(doc, dValue) 
    Next 
End Sub

Sub UpdateParameter(oDoc As Document, dValue As Double)    
    ' Get the user parameters collection. 
    Dim userParams As UserParameters 
    userParams = _  
   	oDoc.ComponentDefinition.Parameters.UserParameters 
	


    Dim param As Parameter 
    'set/create parameter
	Try
   	param = userParams.Item("TestParameter") 
	param.Value = dValue
	Catch  
   'The parameter doesn't exist so add it. 
    param = userParams.AddByExpression("TestParameter", _  
   	dValue, UnitsTypeEnum.kDefaultDisplayLengthUnits) 
    End Try	
	
End Sub&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:34:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/create-parameters-in-assembly-with-ilogic-rule/m-p/6878233#M290997</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2017-02-14T22:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create Parameters in Assembly with iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/create-parameters-in-assembly-with-ilogic-rule/m-p/6907791#M290998</link>
      <description>&lt;P&gt;Thanks for the great help.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 00:29:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/create-parameters-in-assembly-with-ilogic-rule/m-p/6907791#M290998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-28T00:29:07Z</dc:date>
    </item>
  </channel>
</rss>

