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:Ā 

error message when I run a rule

1 REPLY 1
SOLVED
Reply
Message 1 of 2
mostafamahmoudseddek94
437 Views, 1 Reply

error message when I run a rule

I have a rule called "Configurator" I run this rule many times before and it worked fine but not anymore and it responds today with an error message and I do not understand the message 

mostafamahmoudseddek94_0-1594708880797.png

mostafamahmoudseddek94_1-1594708910839.png

can anyone tell me what happened here and what this message tell 

you can find the code I have written below

I use Inventor 2019  and if there is additional info you need to help me, let me know 

Thanks & best regards 

 

'-----------------------------------------------------------------------------------------------------------------
'                                                     Stiffners
'-----------------------------------------------------------------------------------------------------------------
If Valve_NO < 11 Then 
	Parameter("Inspectiondoor_reinf:1", "Height") = 30 mm
	Parameter("Inspectiondoor_reinf:1", "Thickness")= 4 mm
Else If Valve_NO >= 11 And Valve_NO <= 14 Then 
	Parameter("Inspectiondoor_reinf:1", "Height") = 40 mm
	Parameter("Inspectiondoor_reinf:1", "Thickness")= 6 mm
End If 
' stiffners FD
If Bags_NO = 4 Then
		Stiffeners_FD = 250 mm
ElseIf Bags_NO = 5 Or Bags_NO = 7  Then 
		Stiffeners_FD = 285 mm
ElseIf Bags_NO = 6 Then 
		Stiffeners_FD = 185 mm
ElseIf Bags_NO = 9 Then 
		Stiffeners_FD = 375 mm
Else 
		Stiffeners_FD = 385 mm
End If 			
				
' Stiffners Spacing 
If     Bags_NO = 4  Then
	 Spacing = 250 mm
ElseIf Bags_NO = 9  Then 
	Spacing = 340 mm
ElseIf Bags_NO = 11 Then 
	Spacing = 350 mm 
ElseIf Bags_NO = 13 Then 
	Spacing = 360 mm
Else 
	Spacing = 400 mm
		End If 		
' Stiffners NO 

Stiffeners_NO = 1 + (Parameter("InspectionDoor_Cover:1", "Length") -2 * Stiffeners_FD - Parameter("InspectionDoor_Stiffeners:1", "Thickness")) / Spacing
'-----------------------------------------------------------------------------------------------------------------
'                                                     Hinge
'-----------------------------------------------------------------------------------------------------------------
'Hinge FD
If Bags_NO <= 7 Then 
	Hinge_FD = 160+12 mm 
Else 
	Hinge_FD = 360+12 mm 
End If

'Hinge NO
If Bags_NO <= 11 Then 
	Hinge_NO = 2
Else 
	Hinge_NO = 3
End If

' Hinge X
Hinge_Spacing =(((Parameter("InspectionDoor_Cover:1", "Length")+2*Parameter("InspectionDoor_Cover:1", "Thickness")) -2*(Hinge_FD-12)-120))/(Hinge_NO-1)
'-----------------------------------------------------------------------------------------------------------------
'                                                     Handles
'-----------------------------------------------------------------------------------------------------------------
 
 If Bags_NO = 4 Then 
	HandleOffsite = -530 mm 
	Handle_NO = 1
	Component.IsActive("InspectionDoor_Hand:2") = False
Else If Bags_NO = 5 Then 
	Component.IsActive("Hand Pattern") = False
	HandleOffsite = -600 mm 
	Handle_NO = 1
	Component.IsActive("InspectionDoor_Hand:2") = True	
Else If Bags_NO = 6 Or Bags_NO = 7 Then
	HandleOffsite = -340 mm 
	Handle_NO = 1
	Component.IsActive("InspectionDoor_Hand:2") = True
Else If Bags_NO = 8 Then 
	HandleOffsite = -190 mm 
	Handle_NO = 1
	Component.IsActive("InspectionDoor_Hand:2") = True	
Else If Bags_NO > 8 And Bags_NO <= 11 Then 
	HandleOffsite = -190 mm 
	Handle_NO = 2
	Component.IsActive("InspectionDoor_Hand:2") = True
Else If Bags_NO = 12 Then 
	HandleOffsite = -155 mm 
	Handle_NO = 3
	Component.IsActive("InspectionDoor_Hand:2") = True
Else If Bags_NO = 13 Then 
	HandleOffsite = -165 mm 
	Handle_NO = 3
	Component.IsActive("InspectionDoor_Hand:2") = True
Else If Bags_NO = 14 Then 
	HandleOffsite = -175 mm 
	Handle_NO = 3
	Component.IsActive("InspectionDoor_Hand:2") = True
End If	

 

1 REPLY 1
Message 2 of 2

It's kind of difficult to troubleshoot without the whole code and the model, but it seems like the error occurs while setting a Parameter. Maybe try to fix this line by capitalizing the component name?

"InspectionDoor_reinf:1"

 If this doesn't work you can troubleshoot by inserting a message box into different sections of the code to find the exact line that is causing the issue. 

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

Post to forums  

Autodesk Design & Make Report