Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Invalid Parameter when trying to set parameter.expression HRESULT: 0x80070057

0 REPLIES 0
Reply
Message 1 of 1
hozz__
500 Views, 0 Replies

Invalid Parameter when trying to set parameter.expression HRESULT: 0x80070057

I'm having difficulty with a seemingly simple bit of code, assigning a string to MyParam.Expression in the code below fails with INVALID PARAMETER error HRESULT: 0x80070057

 

AllParams is a previously loaded ParameterList

 

MyParam.Expression = MyString is the statement that fails.

 

    Private Sub SaveParameter(ByVal aParamName As String, ByVal NewExpression As String)
        Dim MyString As String
        Dim MyParam As Parameter

        For i = 1 To AllParams.Count
            If AllParams.Item(i).Name = aParamName Then
                MyParam = AllParams.Item(i)
                MyString = NewExpression
                MyParam.Expression = MyString
            End If

        Next
    End Sub

 

AnyHelp would be appreciated,

 

Marv

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report