<?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 Ilogic assembly part creation error in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-assembly-part-creation-error/m-p/10294428#M124154</link>
    <description>&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Im getting the error below everytime I run the assembly program for each part created. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Error in rule: CREATION, in document: testpart.ipt&lt;/P&gt;&lt;P&gt;The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;-----------------ASSEMBLY CODE PORTION---------------------------------------

Components.Add("c:1", "testpart1.ipt")
map.Add("Arg1", SB)
map.Add("Arg2", Width)
map.Add("Arg3", SIDERAIL_T)
map.Add("Arg4", mats)
iLogicVb.RunRule("c:1", "CREATION", map)
Components.Delete("c:1")

---------------------------------------------------------------------------&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;--------------------PART CODE----------------------------------------------

UPSTREAM = RuleArguments("Arg1")
DOWNSTREAM = RuleArguments("Arg2")
WIDTH = RuleArguments("Arg3")
THICKNESS = RuleArguments("Arg4")
M = RuleArguments("Arg5")
RADIUS = RuleArguments("Arg6")
LENGTH = UPSTREAM + DOWNSTREAM

'iProperties.Material=Material
If CUT = False Then
iProperties.Value("Project", "Part Number") = "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS
iProperties.Value("Project", "Stock Number") = LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS
iProperties.Value ("Summary", "Title") =  "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS
ElseIf CUT = True Then
iProperties.Value("Project", "Part Number") = "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS &amp;amp; " CUT"
iProperties.Value("Project", "Stock Number") = "CUT AS REQUIRED"
iProperties.Value ("Summary", "Title") =  "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS &amp;amp; " CUT"
iLogicVb.UpdateWhenDone = True
End If

'define the folder where you want to save the files
oFolder = "C:\Users\ronno\Documents\Inventor\Work\"

'grab the filename
oFileName = iProperties.Value("Summary", "Title") 'without extension

'create the folder if it doesn't exist
If Not System.IO.Directory.Exists(oFolder) Then 
    System.IO.Directory.CreateDirectory(oFolder)
End If

'save as a ipt
ThisDoc.Document.SaveAs(oFolder &amp;amp; oFileName &amp;amp; ".ipt", False)

iLogicVb.UpdateWhenDone = True&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 May 2021 10:17:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-05-06T10:17:14Z</dc:date>
    <item>
      <title>Ilogic assembly part creation error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-assembly-part-creation-error/m-p/10294428#M124154</link>
      <description>&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Im getting the error below everytime I run the assembly program for each part created. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Error in rule: CREATION, in document: testpart.ipt&lt;/P&gt;&lt;P&gt;The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;-----------------ASSEMBLY CODE PORTION---------------------------------------

Components.Add("c:1", "testpart1.ipt")
map.Add("Arg1", SB)
map.Add("Arg2", Width)
map.Add("Arg3", SIDERAIL_T)
map.Add("Arg4", mats)
iLogicVb.RunRule("c:1", "CREATION", map)
Components.Delete("c:1")

---------------------------------------------------------------------------&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;--------------------PART CODE----------------------------------------------

UPSTREAM = RuleArguments("Arg1")
DOWNSTREAM = RuleArguments("Arg2")
WIDTH = RuleArguments("Arg3")
THICKNESS = RuleArguments("Arg4")
M = RuleArguments("Arg5")
RADIUS = RuleArguments("Arg6")
LENGTH = UPSTREAM + DOWNSTREAM

'iProperties.Material=Material
If CUT = False Then
iProperties.Value("Project", "Part Number") = "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS
iProperties.Value("Project", "Stock Number") = LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS
iProperties.Value ("Summary", "Title") =  "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS
ElseIf CUT = True Then
iProperties.Value("Project", "Part Number") = "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS &amp;amp; " CUT"
iProperties.Value("Project", "Stock Number") = "CUT AS REQUIRED"
iProperties.Value ("Summary", "Title") =  "FLOW BLOCK " &amp;amp; M &amp;amp; " - " &amp;amp; LENGTH &amp;amp; " x " &amp;amp; WIDTH &amp;amp; " x " &amp;amp; THICKNESS &amp;amp; " CUT"
iLogicVb.UpdateWhenDone = True
End If

'define the folder where you want to save the files
oFolder = "C:\Users\ronno\Documents\Inventor\Work\"

'grab the filename
oFileName = iProperties.Value("Summary", "Title") 'without extension

'create the folder if it doesn't exist
If Not System.IO.Directory.Exists(oFolder) Then 
    System.IO.Directory.CreateDirectory(oFolder)
End If

'save as a ipt
ThisDoc.Document.SaveAs(oFolder &amp;amp; oFileName &amp;amp; ".ipt", False)

iLogicVb.UpdateWhenDone = True&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 10:17:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-assembly-part-creation-error/m-p/10294428#M124154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-06T10:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic assembly part creation error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-assembly-part-creation-error/m-p/10294859#M124160</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you try commenting lines to identify where the error occurs?&lt;/P&gt;&lt;P&gt;My best guess is that you're using illegal characters in the filename.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 12:58:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-assembly-part-creation-error/m-p/10294859#M124160</guid>
      <dc:creator>j.haggenjos</dc:creator>
      <dc:date>2021-05-06T12:58:00Z</dc:date>
    </item>
  </channel>
</rss>

