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: 

Code stopped working 2014 upgrade 2021

5 REPLIES 5
Reply
Message 1 of 6
Jef_E
348 Views, 5 Replies

Code stopped working 2014 upgrade 2021

Hi all,

 

We are currently going to migrate to 2021, and I am checking some 'custom' work we have running. Sadly I cannot seem to get it to work to the full extent. Previously I did a check to the 2019 version and did not encounter the same problem

 

I receive following error when editing a parameter  value.

 

The current value = 30

The new value = 35

 

Schermafbeelding 2020-10-30 092124.png

 

I can't seem to figure it out why this is failing.

 

Kind regards,



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
5 REPLIES 5
Message 2 of 6
Jef_E
in reply to: Jef_E

In addition I did another test; I started a new plugin using the guide, with following code, producing the same error when setting the value.

 

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim oDoc As PartDocument = _invApp.ActiveDocument

        Dim oParameter As Parameter = oDoc.ComponentDefinition.Parameters.Item("Nozzle_length_positioning")
        MsgBox(oParameter.Value)
        oParameter.Value = 35
        MsgBox(oParameter.Value)
    End Sub

 

Kind regards,



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
Message 3 of 6
raith-mb
in reply to: Jef_E

Did you try

...Value = (Value / 10)

Regards Roland

Message 4 of 6
Jef_E
in reply to: raith-mb


@raith-mb wrote:

Did you try

...Value = (Value / 10)

Regards Roland


No I did not, as this is not the problem...



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
Message 5 of 6
JhoelForshav
in reply to: Jef_E

Hi @Jef_E 

I've tried to reproduce the error in both inventor 2020 and 2021 with no luck... which Autodesk.Inventor.Interop.dll are you referencing? Could you attach a simple VS project where this error occurs?

Message 6 of 6
DRoam
in reply to: Jef_E

On the line that fails, if you hover over the three highlighted terms below, what does Visual Studio say is their type (e.g. hovering over "Value" shows "Property Parameter.Value As Object")?

 

oParameters Item("Nozzle_length_positioning") . Value = value / 10

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report