<?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 Need help with iLogic code - Throws error in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/need-help-with-ilogic-code-throws-error/m-p/6584418#M67015</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to put together an iLogic code by copying and pasting several snippets from this community (Thank you). &amp;nbsp;This code is meant to do the following in this order: 1) Run an external rule (Renaming all drawing sheet names); 2) Prompt for "Release Folder" Location; 3) Create folder "BOM"; 4) Export Parts List of active sheet (should always be the first sheet) to an Excel spreadsheet using a template with options; 5) Create folder "PDF"; 6) Export all sheets to PDF; 7) Create folder "DWG"; 8) Export all sheets to DWG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the issue. &amp;nbsp;I developed this code last week and had it working well on Friday. &amp;nbsp;Today it's throwing an error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error Message Tab:&lt;/P&gt;&lt;P&gt;Error in rule: Release All Exports - Drawing, in document: S450-BW-DB-A1.idw&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;More Info Tab:&lt;/P&gt;&lt;P&gt;System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&lt;BR /&gt;at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)&lt;BR /&gt;at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)&lt;BR /&gt;at LmiRuleScript.Main()&lt;BR /&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;BR /&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would someone be willing to dissect my code and figure out what's wrong? &amp;nbsp;Why would it work one day, but not the next? &amp;nbsp;To my knowledge nothing has changed since it was working on Friday.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI - I've split the code up and think I've narrowed it down to the problem being in the Parts List Export section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also - I'm not much of a programmer. &amp;nbsp;If you can or would like to re-write this code to make it more stable, that would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any kind of help you can provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nate&lt;/P&gt;</description>
    <pubDate>Mon, 26 Sep 2016 14:09:31 GMT</pubDate>
    <dc:creator>Stansteel</dc:creator>
    <dc:date>2016-09-26T14:09:31Z</dc:date>
    <item>
      <title>Need help with iLogic code - Throws error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/need-help-with-ilogic-code-throws-error/m-p/6584418#M67015</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to put together an iLogic code by copying and pasting several snippets from this community (Thank you). &amp;nbsp;This code is meant to do the following in this order: 1) Run an external rule (Renaming all drawing sheet names); 2) Prompt for "Release Folder" Location; 3) Create folder "BOM"; 4) Export Parts List of active sheet (should always be the first sheet) to an Excel spreadsheet using a template with options; 5) Create folder "PDF"; 6) Export all sheets to PDF; 7) Create folder "DWG"; 8) Export all sheets to DWG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the issue. &amp;nbsp;I developed this code last week and had it working well on Friday. &amp;nbsp;Today it's throwing an error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error Message Tab:&lt;/P&gt;&lt;P&gt;Error in rule: Release All Exports - Drawing, in document: S450-BW-DB-A1.idw&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;More Info Tab:&lt;/P&gt;&lt;P&gt;System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&lt;BR /&gt;at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)&lt;BR /&gt;at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)&lt;BR /&gt;at LmiRuleScript.Main()&lt;BR /&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;BR /&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would someone be willing to dissect my code and figure out what's wrong? &amp;nbsp;Why would it work one day, but not the next? &amp;nbsp;To my knowledge nothing has changed since it was working on Friday.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI - I've split the code up and think I've narrowed it down to the problem being in the Parts List Export section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also - I'm not much of a programmer. &amp;nbsp;If you can or would like to re-write this code to make it more stable, that would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any kind of help you can provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nate&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 14:09:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/need-help-with-ilogic-code-throws-error/m-p/6584418#M67015</guid>
      <dc:creator>Stansteel</dc:creator>
      <dc:date>2016-09-26T14:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with iLogic code - Throws error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/need-help-with-ilogic-code-throws-error/m-p/6584647#M67018</link>
      <description>&lt;P&gt;Hi Stansteel,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the Parts List have all of the columns listed ? exactly as they are written:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oOptionsBOM&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 128); font-weight: bold;"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;ExportedColumns&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;ITEM#;QTY;PART#;MATERIAL;DESCRIPTION;COMMENTS;COM CODE;TOTAL WEIGHT&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might pare that down to just two columns, as a test. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oOptionsBOM&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 128); font-weight: bold;"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;ExportedColumns&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;ITEM#;QTY&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&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;</description>
      <pubDate>Mon, 26 Sep 2016 15:07:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/need-help-with-ilogic-code-throws-error/m-p/6584647#M67018</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2016-09-26T15:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with iLogic code - Throws error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/need-help-with-ilogic-code-throws-error/m-p/6601106#M67204</link>
      <description>&lt;P&gt;That was right on Curtis. &amp;nbsp;I&amp;nbsp;must have written this code while looking at an old drawing which had the TOTAL WEIGHT column spelled out. &amp;nbsp;My new drawings have it abbreviated to "TOTAL WT.". &amp;nbsp;Simple. &amp;nbsp;Thank you for helping me trouble shoot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nate&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 18:36:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/need-help-with-ilogic-code-throws-error/m-p/6601106#M67204</guid>
      <dc:creator>Stansteel</dc:creator>
      <dc:date>2016-10-04T18:36:24Z</dc:date>
    </item>
  </channel>
</rss>

