- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a multi-value parameter "MG_Steel_Grade" and based on what I select another multi-value parameter "MG_PT001" is populated with data from an Excel table and a particular value should be displayed.
The problem is that about half the time the particular value of "MG_PT001" is not updated/changed and remains unchanged.
Values in the "MG_Steel_Grade" parameter are:
1)S235 2)S355 3)WNr. 1.4301, AISI 304 4)WNr. 1.4571, AISI 316 Ti
The values for the "MG_PT001" parameter are taken from an Excel table embedded in the assembly, screenshot of the Excel table is attached.
For S235 and S355 the options are in column A, for WNr. 1.4301, AISI 304 and 4. WNr. 1.4571 AISI 316 Ti the options are in column D.
By default if I choose S235 the "MG_PT001" parameter should show EN10025 S235JR.
For S355 it should show EN10025 S355J2 and so on...
Now when I switch from S235 or S355 to any WNr. and vice versa the "MG_PT001" gets updated/changed correctly, but when I switch from S235 to S355 the "MG_PT001" is not updated and the value remains the same as it was for S235.
This also applies for switching from WNr. 1.4301, AISI 304 to WNr. 1.4571, AISI 316 Ti and vice versa, the value of "MG_PT001" remains unchanged.
Here is example on a 1 min youtube video https://www.youtube.com/watch?v=pLD1fXoNAwU
I don't know what to do or if this is a strange behaviour of Inventor... is there a way to fix it?
In a forum post I found this line of code "MultiValue.UpdateAfterChange = True" but it does not help.
The rule looks like this and example files are attached.
Dim Indx_PT001 As Integer
Dim ExcMin As String
Dim ExcMax As String
Select Case MG_Steel_Grade
Case "S235"
Indx_PT001 = 0
ExcMin = "A2"
ExcMax = "A10"
Case "S355"
Indx_PT001 = 1
ExcMin = "A2"
ExcMax = "A10"
Case "WNr. 1.4301, AISI 304"
Indx_PT001 = 0
ExcMin = "D2"
ExcMax = "D10"
Case "WNr. 1.4571, AISI 316 Ti"
Indx_PT001 = 4
ExcMin = "D2"
ExcMax = "D10"
End Select
If Component.IsActive("PT001") = True Then
Select Case Parameter("Type")
Case "Boss"
MultiValue.SetValueOptions(True, DefaultIndex := Indx_PT001)
MultiValue.List("MG_PT001") = GoExcel.CellValues("3rd Party:Material_Table", "Material_Solid_Bars", ExcMin, ExcMax)
Case "Tube"
MultiValue.SetValueOptions(True, DefaultIndex := Indx_PT001)
MultiValue.List("MG_PT001") = GoExcel.CellValues("3rd Party:Material_Table", "Material_Tubes", ExcMin, ExcMax)
Case "Washer"
MultiValue.SetValueOptions(True, DefaultIndex := 5)
MultiValue.List("MG_PT001") = GoExcel.CellValues("3rd Party:Material_Table", "Material_Solid_Bars", ExcMin, ExcMax)
End Select
Parameter("PT001", "Mat_Grade") = MG_PT001
End If
Solved! Go to Solution.