@bradeneuropeArthur @A.Acheson @robbeRtek
Hi guys, thank you for your reaction.
To make it more simple I describe what i'm basically doing. And also my thinking process.
First off I have a main assembly which sends parameters to a sub part which is basically my master. All the sub-parts are linked to this part. My guess is that because of the migration form 2022 to 2024 some parameter objects are not defined correctly in those sub-parts.
I'm using just a local trigger (undefined object, worked perfectly before to define all these will take me a long time, also all the other, lets say 100 components do work.) which triggers the rule. The triggering parameter which is linked is blue. Example below:
Trigger = Male + ThicknessFlange + Material_Type
iLogicVb.RunExternalRule("Sheetmetal_Style.iLogicVb")
If Parameter("Male") = 0 Then
Parameter("d22") = Parameter("HeightFemaleFlange")
Parameter("d199") = Parameter("Flange") + Parameter("ThicknessFlange ")
Parameter("d112") = -90.0 deg
Feature.IsActive("Hole1") = False
In the main form/assembly i have an input form which has a boolean, i'm converting that boolean into an integer 0/1, the rules into the sub-parts have just simple if then statements with the 0's and 1's. As you can see above.
I made a general sheetmetal_style external rule which triggers with an unitless parameter. i have excluded this rule and still the same issue. Maybe you guys can find out how or what.
Basically a conversion chart which converts text into a string and then sets the Sheetmetal Style. After setting the Sheet Metal style it gives me an error. But with just executing the plain code it does not give me an error. It says "Executing Set Sheet Metal Defaults" then gives me the DISP_E_EXCEPTION error.
Code below is my sheetmetal string defining rule:
I'm using 5 different types of Materials. Which has thicknesses between: 1, 1,5, 2, 3
Plaatdikte means thickness
And Naam means name
Dim SheetMetal_Style_Plaatdikte As String
Dim SheetMetal_Style_Naam As String
SheetMetal_Style_Plaatdikte = CStr(Parameter("Plaatdikte"))
If SheetMetal_Style_Plaatdikte.Contains(",") Then
SheetMetal_Style_Plaatdikte.Replace(",",".")
End If
Select Case SheetMetal_Style_Plaatdikte
Case "1"
SheetMetal_Style_Plaatdikte = "1.00"
Case "1,5"
SheetMetal_Style_Plaatdikte = "1.50"
Case "2"
SheetMetal_Style_Plaatdikte = "2.00"
Case "3"
SheetMetal_Style_Plaatdikte = "3.00"
End Select
Select Case Parameter("Materiaal_Type")
Case 1
SheetMetal_Style_Naam = "ALMG3-" & SheetMetal_Style_Plaatdikte
Case 2
SheetMetal_Style_Naam = "SV-" & SheetMetal_Style_Plaatdikte
Case 3
SheetMetal_Style_Naam = "RVS304-" & SheetMetal_Style_Plaatdikte
Case 4
SheetMetal_Style_Naam = "RVS316-" & SheetMetal_Style_Plaatdikte
Case 5
SheetMetal_Style_Naam = "ELO-" & SheetMetal_Style_Plaatdikte
End Select
SheetMetal.SetActiveStyle(SheetMetal_Style_Naam)
InventorVb.DocumentUpdate()
iLogicVb.UpdateWhenDone = True