<?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: &amp;quot;The parameter is incorrect&amp;quot; when setting Macro Control Dec descri in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527276#M80079</link>
    <description>&lt;P&gt;Is it possible that its complaining about the content of your text, such as commands don't like to use spaces.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 17:11:45 GMT</pubDate>
    <dc:creator>JamieVJohnson2</dc:creator>
    <dc:date>2019-01-16T17:11:45Z</dc:date>
    <item>
      <title>"The parameter is incorrect" when setting Macro Control Dec descriptive text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527042#M80078</link>
      <description>&lt;P&gt;I'm trying to set the descriptive text for a macro control definition, using the iLogic code below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oMacroDef As Inventor.MacroControlDefinition = Nothing
Try
	oMacroDef = ThisApplication.CommandManager.ControlDefinitions("macro:" &amp;amp; "testmodule" &amp;amp; "." &amp;amp; "testsub")
	MsgBox("Got existing definition")
Catch
	oMacroDef = ThisApplication.CommandManager.ControlDefinitions.AddMacroControlDefinition("testmodule" &amp;amp; "." &amp;amp; "testsub")
	MsgBox("Created new definition")
End Try

MsgBox("Current description: " &amp;amp; oMacroDef.DescriptionText)

oMacroDef.DescriptionText = "My Custom Description."

MsgBox("New description: " &amp;amp; oMacroDef.DescriptionText)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creating or getting the macro definition works perfectly, as does reading the descriptive text. However, when I try to set the descriptive text, I get the&amp;nbsp; error: "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the API manual, the&amp;nbsp;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-ACD01714-150F-4365-8794-90AAA0A705AD" target="_blank"&gt;DescriptionText property&lt;/A&gt;&amp;nbsp;is a read/write property. So why can't I set it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running Inventor 2017.4.7.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 16:13:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527042#M80078</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-16T16:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527276#M80079</link>
      <description>&lt;P&gt;Is it possible that its complaining about the content of your text, such as commands don't like to use spaces.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 17:11:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527276#M80079</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-01-16T17:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527334#M80080</link>
      <description>&lt;P&gt;I wouldn't think so, it's not complaining about the command name, it's complaining about the description text, which should definitely be able to contain spaces. Just for kicks I tried removing the spaces (and the period) and it still throws the error. So it must be something else.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 17:27:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527334#M80080</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-16T17:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527569#M80081</link>
      <description>&lt;P&gt;Inventor refuses to set it to "" as well.&amp;nbsp; This looks like a case of incomplete API, and 'any error will do'.&amp;nbsp; Is there a way to set the text WHILE creating the object?&amp;nbsp; Because it is acting as a read-only value (or a read/write value to a read only value), in those situations the developer may have intended it to be set once and only once.&amp;nbsp; Still experimenting on it.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:40:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527569#M80081</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-01-16T18:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527951#M80082</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3677112"&gt;@JamieVJohnson2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there a way to set the text WHILE creating the object?&amp;nbsp; Because it is acting as a read-only value (or a read/write value to a read only value), in those situations the developer may have intended it to be set once and only once.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Nope, the only way to create a MacroControlDefinition is using &lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-B769BA2B-85D0-4026-A677-FDC660306389" target="_blank"&gt;ControlDefinitions.AddMacroControlDefinition&lt;/A&gt;, which only accepts one argument: the name of the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So right now it seems like your "incomplete API" explanation is most likely.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;, can you comment on if this is the case? To bring you up to speed, trying to set the &lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-ACD01714-150F-4365-8794-90AAA0A705AD" target="_blank"&gt;MacroControlDefinition.DescriptionText&lt;/A&gt;&amp;nbsp;property always results in a "The parameter is incorrect" error, even though it's supposed to be a read/write property. Is this a problem with the API, or am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 20:44:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8527951#M80082</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-16T20:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8528188#M80083</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1171223"&gt;@DRoam&lt;/a&gt;, you're right: the API is incomplete. The setter for the&amp;nbsp;MacroControlDefinition.DescriptionText is not implemented&amp;nbsp;and will always throw an error&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We should either implement it, or update the documentation. I'll try to find out more.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 22:06:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8528188#M80083</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2019-01-16T22:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8528743#M80084</link>
      <description>&lt;P&gt;If you want users to view the description/tooltip for the macro button, you can set the ProgressiveTooltip instead of the MacroControlDefinition.Description. You can use below lines:&lt;/P&gt;
&lt;PRE&gt;oMacroDef.ProgressiveToolTip.Title = "Command Name"
oMacroDef.ProgressiveToolTip.Description = "Brief description of the command."
oMacroDef.ProgressiveToolTip.ExpandedDescription = "Detailed description of the command."&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to replace your code:&lt;/P&gt;
&lt;PRE&gt;oMacroDef.DescriptionText = "My Custom Description."&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is a sample button with the progressive tooltip:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="progressivetooltip.png" style="width: 437px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/591962i08EEF3F0CCA7ABA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="progressivetooltip.png" alt="progressivetooltip.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 05:06:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8528743#M80084</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-01-17T05:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8529926#M80085</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/532715"&gt;@YuhanZhang&lt;/a&gt;&amp;nbsp;that's great! Thanks for that tip. That will work great for my ribbon buttons.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, the button I actually was trying to do this for is going into the File menu, and apparently file menu buttons don't show tooltips...?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a reason for this? Is this something that could be implemented?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 14:29:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8529926#M80085</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-17T14:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8530092#M80086</link>
      <description>&lt;P&gt;A couple other observations...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. It appears the&amp;nbsp;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-F47AD710-E30B-42DF-A0EF-305CDAE62953" target="_blank"&gt;MacroControlDefinition.ToolTipText&lt;/A&gt;&amp;nbsp;set method hasn't been properly implemented, as well. I get the same "The parameter is incorrect" error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. I think possibly the TargetControlInternalName argument for the&amp;nbsp;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-65E12C75-8166-4ECF-BEF3-614C3CE5D5F5" target="_blank"&gt;CommandControls.AddMacro&lt;/A&gt;&amp;nbsp;method may not be properly implemented, either. I'm pretty sure I'm using it correctly, but it always places my button after the first control in the CommandControls collection rather than the one I specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I'm using, you can run it to see what I'm talking about. It should place the custom button after the "Export to DWG" button, but instead it places it after the "Image" button.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oFileButtons As Inventor.CommandControls = ThisApplication.UserInterfaceManager.FileBrowserControls

Dim oExportButton As Inventor.CommandControl = oFileButtons.Item("Export")

'~~~~~Get or create Macro Control Definition~~~~~
Dim oMacroDef As Inventor.MacroControlDefinition = Nothing
Try
	oMacroDef = ThisApplication.CommandManager.ControlDefinitions("macro:" &amp;amp; "RibbonButtons" &amp;amp; "." &amp;amp; "DXF&amp;nbsp;Auto–Export")
Catch
	Try
		oMacroDef = ThisApplication.CommandManager.ControlDefinitions.AddMacroControlDefinition("RibbonButtons" &amp;amp; "." &amp;amp; "DXF&amp;nbsp;Auto–Export")
	Catch
		MessageBox.Show("Could not create control definition for macro """ &amp;amp; "DXF&amp;nbsp;Auto–Export" &amp;amp; """ in module """ &amp;amp; "RibbonButtons" &amp;amp; """.")
		Exit Sub
	End Try
End Try

'~~~~~Set Macro properties~~~~~
'oMacroDef.DescriptionText = "Exports DXFs for the active Assembly (or a single active Part) to the Project folder."
oMacroDef.ProgressiveToolTip.Title = "DXF Auto-Export"
oMacroDef.ProgressiveToolTip.Description = "Exports DXFs for the active Assembly (or a single active Part) to the Project folder."

'~~~~~Check for button~~~~~
Dim oButton As Inventor.CommandControl = Nothing
For Each oCheckButton As Inventor.CommandControl In oExportButton.ChildControls
	If oCheckButton.ControlDefinition Is oMacroDef Then
		oButton  = oCheckButton
		Exit For
	End If
Next

'~~~~~Create button if missing~~~~~
If oButton Is Nothing Then
	Try
		oButton = oExportButton.ChildControls.AddMacro(oMacroDef,True,True,"AppExportDwgCmd",False)
	Catch
		MessageBox.Show("Could not create button for macro """ &amp;amp; "RibbonButtons" &amp;amp; "." &amp;amp; "DXF&amp;nbsp;Auto–Export" &amp;amp; """ " &amp;amp; _
			"in menu """ &amp;amp; "Export" &amp;amp; """ in File Menu.")
	End Try
Else
	'Un-comment the following line for testing. Running this rule will then toggle the button on and off.
	oButton.Delete
End If&lt;/PRE&gt;
&lt;P&gt;Is this an API error or a PEBKAC error? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 15:12:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8530092#M80086</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-17T15:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8532333#M80087</link>
      <description>&lt;P&gt;I thought you want to add the macro to the ribbon panels, then you can use the progressive tooltip, if you place it to File Browser there are some limitations/issues to it.&amp;nbsp; At present you can either just place it on the ribbon panel or create a ButtonDefinition for File Browser.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 10:52:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8532333#M80087</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-01-18T10:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8532646#M80088</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/532715"&gt;@YuhanZhang&lt;/a&gt;, is it possible to associate a macro with a ButtonDefinition?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 13:35:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8532646#M80088</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-18T13:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8539510#M80089</link>
      <description>&lt;P&gt;We can add ButtonDefinition from a macro, but to make the button definition work in VBA&amp;nbsp;from clicking a button that would introduce some issue to you, like the VBA may be held because you need to monitor the button click so you can't run any other VBA macros, and users may stop the command carelessly. I recommend to just create an addin to do the export DXF job instead of macro/iLogic rule if you want to place the button onto the File Browser menu. But I can show you how to create the button from VBA&amp;amp;iLogic code&amp;nbsp;here, you can make your decision:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Copy the below VBA code to your "Modul1" module in ApplicationProject.&lt;/P&gt;
&lt;PRE&gt;Sub CreateExportDXFCommand()
    Dim oFileButtons As Inventor.CommandControls
    Set oFileButtons = ThisApplication.UserInterfaceManager.FileBrowserControls
    
    Dim oExportButton As Inventor.CommandControl
    Set oExportButton = oFileButtons.Item("Export")
    
     
    Dim oExportDXFDef As Inventor.ButtonDefinition
     On Error Resume Next
     Set oExportDXFDef = ThisApplication.CommandManager.ControlDefinitions("CustomAutoExportDXFCmd")
     
     If Err Then
        Err.Clear
        On Error GoTo 0
        Set oExportDXFDef = ThisApplication.CommandManager.ControlDefinitions.AddButtonDefinition("Auto Export to DXF", "CustomAutoExportDXFCmd", kFileOperationsCmdType, "Custom commands", "Auto Export active part/assembly document to DXF", "Using this command to auto export your current document to DXF")
     End If
    
    oExportDXFDef.ProgressiveToolTip.Title = "DXF Auto-Export"
    oExportDXFDef.ProgressiveToolTip.Description = "Exports DXFs for the active Assembly (or a single active Part) to the Project folder."
    
    Dim oButton As Inventor.CommandControl
    Dim oCheckButton As CommandControl
    For Each oCheckButton In oExportButton.ChildControls
        If oCheckButton.ControlDefinition Is oExportDXFDef Then
            Set oButton = oCheckButton
            Exit For
        End If
    Next
    
    '~~~~~Create button if missing~~~~~
    If oButton Is Nothing Then
      
           Set oButton = oExportButton.ChildControls.AddButton(oExportDXFDef, True, True, "AppExportDwgCmd", False)
           
           Dim ocls As New Class1
           ocls.init
      
    Else
        'Un-comment the following line for testing. Running this rule will then toggle the button on and off.
        oButton.Delete
    End If

End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Copy below VBA code to your "Class1" class module in ApplicationProject.&lt;/P&gt;
&lt;PRE&gt;Private WithEvents oButtonDef As ButtonDefinition

Public Sub init()
   Set oButtonDef = ThisApplication.CommandManager.ControlDefinitions("CustomAutoExportDXFCmd")
     
    Do

        ThisApplication.UserInterfaceManager.DoEvents
    Loop Until bStop
    
    
End Sub
Private Sub oButtonDef_OnExecute(ByVal Context As NameValueMap)
     ' here add your code to export the active document to DXF
     MsgBox "I am triggered."
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Add below iLogic code to an iLogic rule, and you can run the rule.&lt;/P&gt;
&lt;PRE&gt;Sub Main()
	Dim m_inventorApp As Inventor.Application
	m_inventorApp = ThisApplication
    &lt;BR /&gt;    On Error Resume Next
    ' get the application VBA project
    Dim oVBAProj As InventorVBAProject
    Dim oAppVBAProj As InventorVBAProject
    For Each oVBAProj In m_inventorApp.VBAProjects
        If oVBAProj.ProjectType = VBAProjectTypeEnum.kApplicationVBAProject Then
            oAppVBAProj = oVBAProj
            Exit For
        End If
    Next

    ' get the VBA module
    Dim oVBAComp As InventorVBAComponent
    oVBAComp = oVBAProj.InventorVBAComponents("Module1")

    Dim oVBASub As InventorVBAMember
    oVBASub = oVBAComp.InventorVBAMembers("CreateExportDXFCommand")
    oVBASub.Execute()
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Now from the File Browser menu, you can find the button like below, click it a message is popped up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 07:23:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8539510#M80089</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-01-22T07:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8539541#M80090</link>
      <description>&lt;P&gt;Attach the preview picture for the command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 07:45:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8539541#M80090</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-01-22T07:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8540253#M80091</link>
      <description>&lt;P&gt;Thanks a lot, Yahun (or should I call you Rocky?) I appreciate you taking the time to show me how to do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been getting closer and closer to feeling like it's time to go the add-in route. It's a little intimidating to me, though. It seems like a daunting thing to take on. I've found multiple guides for how to create one, but they each seem a little different, so I'm not sure which one to follow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to create a very simple, small add-in that all it would do is place some buttons in the ribbon/file menu that simply fire VBA subs or external iLogic rules? That would be a good transition step for me until I can take the time to properly port my tools into the add-in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you help get me started on how to do that, or point me to a guide you would recommend?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 13:46:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8540253#M80091</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-22T13:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8541625#M80092</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1171223"&gt;@DRoam&lt;/a&gt;&amp;nbsp; Since you already know the Inventor Object tree pretty well, the AddIn, can be programmed in VB.Net language with the same object tree, so only a few different syntax updates (being that vba = version 6, and vb.net = version 7 and up).&amp;nbsp; iLogic compiler can use direct VB.Net code so you can quick test ideas in that if you like.&amp;nbsp; Also, you CAN use VB.Net to create and/or execute iLogic code in a blank file or file with existing code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; Dim iLogicAddInGUID As String = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}"
        Dim addin As Inventor.ApplicationAddIn = Nothing
        Try
            addin = invApp.ApplicationAddIns.ItemById(iLogicAddInGUID)
        Catch ex As Exception
            MsgBox("Unable to load iLogic Add In", MsgBoxStyle.SystemModal)
        End Try
        If Not addin.Activated Then
            addin.Activate()
        End If

        Dim strRuleCalcs As String = String.Empty
        strRuleCalcs = "Sub Main()” &amp;amp; vbCrLf &amp;amp;
            “    RunCalcs()” &amp;amp; vbCrLf &amp;amp;
            “    GetCustomProperties()” &amp;amp; vbCrLf &amp;amp;
            “End Sub” 'and many other lines of code for the iLogic editor
invApp.SilentOperation = True
        Dim iLogAuto As Object 'Autodesk.iLogic.Interfaces.IiLogicAutomation
        iLogAuto = addin.Automation
        iLogAuto.CallingFromOutside = True
        iLogAuto.EnterDelayedRuleRunningMode()
        Dim newRule As Object = iLogAuto.AddRule(Model, "Calcs", "")
        newRule.text = strRuleCalcs
        iLogAuto.ExitDelayedRuleRunningMode()
        iLogAuto.RulesOnEventsEnabled = True
        AssignRuleToILogicEvent(Model, "Calcs", "BeforeDocSave0", 700)
        invApp.SilentOperation = False&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 21:20:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8541625#M80092</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-01-22T21:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: "The parameter is incorrect" when setting Macro Control Dec descri</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8542315#M80093</link>
      <description>&lt;P&gt;You can install the Inventor SDK DeveloperTools.msi(e.g. C:\Users\Public\Documents\Autodesk\Inventor 2019\SDK\DeveloperTools.msi), the Developer Tools will install the Inventor Addin Wizards to Visual Studio, so you can now launch VS follow the steps in below help page to create your own addin:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-52422162-1784-4E8F-B495-CDB7BE9987AB" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-52422162-1784-4E8F-B495-CDB7BE9987AB&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also refer to the samples in the Developer Tools(e.g C:\Users\Public\Documents\Autodesk\Inventor 2019\SDK\DeveloperTools\Samples\VB.NET\AddIns\SimpleAddIn) to know how to add buttons to ribbon, and you already know how to add buttons to File Browser menu.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 06:49:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quot-the-parameter-is-incorrect-quot-when-setting-macro-control/m-p/8542315#M80093</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-01-23T06:49:25Z</dc:date>
    </item>
  </channel>
</rss>

