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
I can't seem to figure it out why this is failing.
Kind regards,
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,
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?
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website
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.